DirSizePretty

Determine the size of a folder/directory in bytes without needing to add function to path as well as human readable output

現在この提出コンテンツをフォロー中です。

directory_path = 'C:\';
byteCount = DirSize(directory_path);

returns the number of bytes in the directory_path (e.g. 31,400,000)
or

byteCountString = DirSizePretty(directory_path);
returns the number of bytes in a human readable string (e.g. '31.4 MB')

Also, this was inspired by Richard Moore's DirSize, but I found that DirSize.m needed to be added to the Matlab path to function, something that I don't use in my applications. This version works without adding to the Matlab path, although that should still work

引用

David Freedman (2026). DirSizePretty (https://jp.mathworks.com/matlabcentral/fileexchange/72960-dirsizepretty), MATLAB Central File Exchange. に取得済み.

謝辞

ヒントを得たファイル: DirSize

カテゴリ

Help Center および MATLAB AnswersFile Operations についてさらに検索

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.0.0