Would you accept a PR for a function returning the total size of a specified directory?
See original GitHub issueSomething akin to:
lib.getTotalSize('./some/dir')
.then((size) => {
// Size === total combined size (in bytes) of all files held within specified directory
});
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
Find the total size of certain files within a directory branch
You can either grep total (locale!) and sum up manually, ... awk '{sum+=$1} END {print sum}' : Sum up the file sizes output...
Read more >How do I determine the total size of a directory (folder) from ...
The command du "summarizes disk usage of each FILE, recursively for directories," e.g., du -hs /path/to/directory. -h is to get the numbers "human...
Read more >Working With Files and Directories – The Unix Shell
Let's create a new directory called thesis using the command mkdir thesis (which has no output):. $ mkdir thesis. As you might guess...
Read more >How To Use Find and Locate to Search for Files on Linux
This guide will cover how to use the aptly named find command. This will help you search for files on your system using...
Read more >File path formats on Windows systems | Microsoft Learn
This topic discusses the formats for file paths that you can use on ... If no volume or drive letter is specified and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@errorx666 Good points; I’m leaning against adding this.
@RyanZim I’m currently using
get-folder-size
, but having a built-in function withinfs-extra
would be nice, as it would negate the need for yet another module. The functionality seemed like it was within scope, but maybe not. That’s why I’m asking. 😃