question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Would you accept a PR for a function returning the total size of a specified directory?

See original GitHub issue

Something akin to:

lib.getTotalSize('./some/dir')
    .then((size) => {
        // Size === total combined size (in bytes) of all files held within specified directory
    });

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
RyanZimcommented, Nov 7, 2017

@errorx666 Good points; I’m leaning against adding this.

1reaction
tkamblercommented, Sep 11, 2017

@RyanZim I’m currently using get-folder-size, but having a built-in function within fs-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. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found