diff --git a/html/inc/sandbox.inc b/html/inc/sandbox.inc index 1735709144..d0434ca523 100644 --- a/html/inc/sandbox.inc +++ b/html/inc/sandbox.inc @@ -60,4 +60,29 @@ function sandbox_physical_path($user, $md5) { return dir_hier_path($f, "../../download", $fanout); } +// return list of files in sandbox +// +function sandbox_file_names($user) { + $d = opendir(sandbox_dir($user)); + $names = array(); + while (($f = readdir($d)) !== false) { + if ($f == '.') continue; + if ($f == '..') continue; + $names[] = $f; + } + return $names; +} + +// return a \n"; + $files = sandbox_file_names($user); + foreach ($files as $f) { + $x .= "\n"; + } + $x .= "\n"; + return $x; +} + ?>