Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit ee3920f6 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

New load lib to calculate disk usage in a specified directory (w/pattern)

Use like this:
var diskusage = load({}, "diskusage.js");
print(diskusage.get("/*.txt"));
parent 47f8c020
Pipeline #1195 failed with stage
in 8 minutes and 49 seconds
// Calculate disk usage in specified directory/pattern
"use strict";
function get(dir)
{
var used = 0;
var list = directory(dir);
for(var i = 0; i < list.length; i++) {
if(!file_isdir(list[i]))
used += file_size(list[i]);
}
return used;
}
this;
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment