6 public static function isCreateable($file) {
7 if (file_exists($file)) {
8 return is_writable($file);
11 $next = dirname($file);
14 if (file_exists($current)) {
15 return is_writable($current);
17 $next = dirname($current);
18 } while ($current && $next && $current != $next);
23 public static function makeWebWriteable($path) {
24 // Blerg: Setting world-writable works as a default, but
25 // it 'sprone to break systems that rely on umask's or facl's.
29 public static function isDeletable($path) {
30 return is_writable(dirname($path));
38 public static function createTempDir($prefix) {
39 $newTempDir = tempnam(sys_get_temp_dir(), $prefix) . '.d';
40 mkdir($newTempDir, 0755, TRUE);