I have not yet looked at the plugin, but my idea was to let the OS
handle directory size calculations, on both platforms.
on Mac/Unix du -c returns text which looks something like this (desktop
folder size):
10472072 <tab> /Users/<username>/Desktop/<some file/directory>
27426552 <tab> /Users/<username>/Desktop
as I understand the DOS command 'dir', and my simple test in cmd.exe.
Dir <path> /S --- returns the current directory, and sub directories,
listing, with a total of ALL file and sub-directory sizes.
the last 3 lines of this (assuming the result is text) look like this:
Total Files Listed:
2678 File(s) 1,839,599,592 bytes
2924 Dir(s) 369,796,022,272 bytes free
given that, it is simple to parse out the total directory size (2678
File(s) 1,839,599,592 bytes)
On Thu, 2 Nov 2017 08:42:38 +0000, Keisuke Miyako via 4D_Tech wrote:
> I looked up the internet, it turns out we really have to traverse the
> directory tree...
> given the atomic nature of LEP, it might not be the best way to
> calculate the total size of files in a folder.
>
> here is plugin with an option to abort:
>
> https://github.com/miyako/4d-plugin-get-folder-size
>
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ: http://lists.4d.com/faqnug.html
> Archive: http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************