@@ 56-65 (lines=10) @@ | ||
53 | * @param string $path |
|
54 | * @return bool |
|
55 | */ |
|
56 | public static function writable($path) |
|
57 | { |
|
58 | $path = Normalize::diskFullPath($path); |
|
59 | ||
60 | if (!self::exist($path)) { |
|
61 | return false; |
|
62 | } |
|
63 | ||
64 | return is_writable($path); |
|
65 | } |
|
66 | ||
67 | /** |
|
68 | * Check is file executable |
@@ 49-58 (lines=10) @@ | ||
46 | * @param int $chmod |
|
47 | * @return bool |
|
48 | */ |
|
49 | public static function create($path, $chmod = 0755) |
|
50 | { |
|
51 | $path = Normalize::diskFullPath($path); |
|
52 | ||
53 | if (self::exist($path)) { |
|
54 | return false; |
|
55 | } |
|
56 | ||
57 | return @mkdir($path, $chmod, true); |
|
58 | } |
|
59 | ||
60 | /** |
|
61 | * Remove directory recursive. |