@@ -23,7 +23,7 @@ final class FileSystem
2323 * Creates a directory if it does not exist, including parent directories.
2424 * @throws Nette\IOException on error occurred
2525 */
26- public static function createDir (string $ dir , int $ mode = 0777 ): void
26+ public static function createDir (string $ dir , int $ mode = 0o777 ): void
2727 {
2828 if (!is_dir ($ dir ) && !@mkdir ($ dir , $ mode , recursive: true ) && !is_dir ($ dir )) { // @ - dir may already exist
2929 throw new Nette \IOException (sprintf (
@@ -211,7 +211,7 @@ public static function readLines(string $file, bool $stripNewLines = true): \Gen
211211 * Writes the string to a file.
212212 * @throws Nette\IOException on error occurred
213213 */
214- public static function write (string $ file , string $ content , ?int $ mode = 0666 ): void
214+ public static function write (string $ file , string $ content , ?int $ mode = 0o666 ): void
215215 {
216216 static ::createDir (dirname ($ file ));
217217 if (@file_put_contents ($ file , $ content ) === false ) { // @ is escalated to exception
@@ -238,7 +238,7 @@ public static function write(string $file, string $content, ?int $mode = 0666):
238238 * Recursively traverses and sets permissions on the entire contents of the directory as well.
239239 * @throws Nette\IOException on error occurred
240240 */
241- public static function makeWritable (string $ path , int $ dirMode = 0777 , int $ fileMode = 0666 ): void
241+ public static function makeWritable (string $ path , int $ dirMode = 0o777 , int $ fileMode = 0o666 ): void
242242 {
243243 if (is_file ($ path )) {
244244 if (!@chmod ($ path , $ fileMode )) { // @ is escalated to exception
0 commit comments