From e05e872132629ca877dcb74f34232b88125b5f40 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 3 Jan 2012 09:30:43 +0000 Subject: [PATCH] - sandbox stuff svn path=/trunk/boinc/; revision=24985 --- html/inc/sandbox.inc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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; +} + ?>