1111internal func & ( left: UInt32 , right: mode_t ) -> mode_t {
1212 return mode_t ( left) & right
1313}
14- #elseif os(Android)
15- internal func & ( left: mode_t , right: Int32 ) -> mode_t {
16- return left & mode_t ( right)
17- }
1814#endif
1915
2016#if os(WASI)
@@ -413,7 +409,7 @@ extension FileManager {
413409 if !parent. isEmpty && !fileExists( atPath: parent, isDirectory: & isDir) {
414410 try createDirectory ( atPath: parent, withIntermediateDirectories: true , attributes: attributes)
415411 }
416- if mkdir ( pathFsRep, mode_t ( S_IRWXU) | mode_t ( S_IRWXG) | mode_t ( S_IRWXO) ) != 0 {
412+ if mkdir ( pathFsRep, S_IRWXU | S_IRWXG | S_IRWXO) != 0 {
417413 let posixError = errno
418414 if posixError == EEXIST && fileExists ( atPath: path, isDirectory: & isDir) && isDir. boolValue {
419415 // Continue; if there is an existing file and it is a directory, that is still a success.
@@ -432,7 +428,7 @@ extension FileManager {
432428 throw _NSErrorWithErrno ( EEXIST, reading: false , path: path)
433429 }
434430 } else {
435- if mkdir ( pathFsRep, mode_t ( S_IRWXU) | mode_t ( S_IRWXG) | mode_t ( S_IRWXO) ) != 0 {
431+ if mkdir ( pathFsRep, S_IRWXU | S_IRWXG | S_IRWXO) != 0 {
436432 throw _NSErrorWithErrno ( errno, reading: false , path: path)
437433 } else if let attr = attributes {
438434 try self . setAttributes ( attr, ofItemAtPath: path)
0 commit comments