Go Back   FlashFXP Forums > > > >

ioFTPD General New releases, comments, questions regarding the latest version of ioFTPD.

Thread Tools Rate Thread Display Modes
Old 05-16-2012, 05:45 PM   #1
Junior Member
Join Date: May 2012
Posts: 3
Default get the correct size of directories

I'm new to ioftpd. Yesterday I decided to give it a try after I failed at installing drftpd on my windows system

.. so far it's working very well, but there is one little thing that I want to get changed. Ioftpd can give FlashFXP the size of the folders it's listening, so that I can know how big the files inside are without changing the dir.
But this isn't working quite proper. It's only showing the size of some folders (in the root dir) but even those are not correct. When I change to the subfolders I can see the correct size of each folder, but why can't the size of the subfolders be count together and shown in the root dir?

I attached a picture of what I mean, because a picture say's more than 1000 word's and I know that my english is horrible :P

Thanks for your help!
Attached Images
File Type: png root.png (117.4 KB, 15 views)
Leo.1906 is offline   Reply With Quote
Old 05-22-2012, 02:23 PM   #2
Junior Member
Join Date: May 2012
Posts: 3

~ push ~
Leo.1906 is offline   Reply With Quote
Old 05-26-2012, 12:06 PM   #3
Too much time...
FlashFXP Beta Tester
ioFTPD Administrator
Join Date: May 2005
Posts: 1,194

ioFTPD will only report the size of the files in immediate subdirectories (but not children of those subdirs) during a directory listing. Many other FTP servers don't report any size at all because they don't cache multiple directory contents. I think drFTPD is sort of unique because the Master doesn't keep any files itself so it was simpler to keep somewhat accurate usage totals for entire directory trees because it was just stuffing data in a huge memory database and didn't use the filesystem itself to cache info as is usually done. It also assumes that nothing else will touch the files on slaves (i.e. nobody adding/deleting via windows explorer), and that there is only 1 way to view the filesystem. ioFTPD allows multiple .vfs files so the total size for 1 person seeing the /archive directory might be radically different than another user's viewing the /archive dir who can see more of it.

This doesn't mean that ioFTPD couldn't report total tree sizes in the future when I switch over to the new directory caching code, but it won't be anytime really soon. The only way to cheat and do it quickly would be to assume the entire filesystem can be cached in memory or allow only 1 VFS view (and somehow account for hidden dirs throughout the filesystem) so it could be stored in a database...

The reason we just do 1 level deep is because going deeper has consequences. If you enter a directory with a subdir for every day that's 365 dirs it has to cache right now (assuming you haven't disabled subdir sizing entirely). However if you went 2 levels deep that could be 100K+ dirs assuming a few hundred per day! Ouch.

The only way around some of the issues is using a database and/or stashing subdir totals in parent dirs and ignoring hidden subdirs deeper in the tree. I've toyed with both, but neither are worth implementing until I switch to the new directory caching code.
Yil is offline   Reply With Quote

correct, dir, flashfxp, size, subfolders

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 10:27 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)