Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/Filesystem.php
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | public static function readFile($path) { | ||||
return $data; | return $data; | ||||
} | } | ||||
/** | /** | ||||
* Make assertions about the state of path in preparation for | * Make assertions about the state of path in preparation for | ||||
* writeFile() and writeFileIfChanged(). | * writeFile() and writeFileIfChanged(). | ||||
*/ | */ | ||||
private static function assertWritableFile($path) { | public static function assertWritableFile($path) { | ||||
$path = self::resolvePath($path); | $path = self::resolvePath($path); | ||||
$dir = dirname($path); | $dir = dirname($path); | ||||
self::assertExists($dir); | self::assertExists($dir); | ||||
self::assertIsDirectory($dir); | self::assertIsDirectory($dir); | ||||
// File either needs to not exist and have a writable parent, or be | // File either needs to not exist and have a writable parent, or be | ||||
// writable itself. | // writable itself. | ||||
▲ Show 20 Lines • Show All 1,211 Lines • Show Last 20 Lines |