Quick json directory tree for CMD_FILE_MANAGER

Version 1.532

Feature
Finished

Sample call: CMD_FILE_MANAGER?action=tree&json=yes&path=/ outputs (for example, heavily redacted): [ { "path": "/Maildir", "dirs": 0, "files": 1, "files_size": 4096 }, { "path": "/backups", "dirs": 0, "files": 7, "files_size": 963448607 }, { "path": "/", "dirs": 2, "files": 13, "files_size": 48422568 } ] The output is not stored before sending. The recursive directory traversal spits out the information the moment it's got it, making this the fastest way to get a directory tree. The files_size is the sum of all file-size totals in this directory (not sub directories), in bytes.

Interested to try DirectAdmin? Get a 30-day Free Trial!