@@ -21,7 +21,7 @@ final class FileSystem
2121 * Creates a directory if it does not exist, including parent directories.
2222 * @throws Nette\IOException on error occurred
2323 */
24- public static function createDir (string $ dir , int $ mode = 0777 ): void
24+ public static function createDir (string $ dir , int $ mode = 0o777 ): void
2525 {
2626 if (!is_dir ($ dir ) && !@mkdir ($ dir , $ mode , recursive: true ) && !is_dir ($ dir )) { // @ - dir may already exist
2727 throw new Nette \IOException (sprintf (
@@ -209,7 +209,7 @@ public static function readLines(string $file, bool $stripNewLines = true): \Gen
209209 * Writes the string to a file.
210210 * @throws Nette\IOException on error occurred
211211 */
212- public static function write (string $ file , string $ content , ?int $ mode = 0666 ): void
212+ public static function write (string $ file , string $ content , ?int $ mode = 0o666 ): void
213213 {
214214 static ::createDir (dirname ($ file ));
215215 if (@file_put_contents ($ file , $ content ) === false ) { // @ is escalated to exception
@@ -236,7 +236,7 @@ public static function write(string $file, string $content, ?int $mode = 0666):
236236 * Recursively traverses and sets permissions on the entire contents of the directory as well.
237237 * @throws Nette\IOException on error occurred
238238 */
239- public static function makeWritable (string $ path , int $ dirMode = 0777 , int $ fileMode = 0666 ): void
239+ public static function makeWritable (string $ path , int $ dirMode = 0o777 , int $ fileMode = 0o666 ): void
240240 {
241241 if (is_file ($ path )) {
242242 if (!@chmod ($ path , $ fileMode )) { // @ is escalated to exception
0 commit comments