11
11
internal func & ( left: UInt32 , right: mode_t ) -> mode_t {
12
12
return mode_t ( left) & right
13
13
}
14
- #elseif os(Android)
15
- internal func & ( left: mode_t , right: Int32 ) -> mode_t {
16
- return left & mode_t ( right)
17
- }
18
14
#endif
19
15
20
16
#if os(WASI)
@@ -413,7 +409,7 @@ extension FileManager {
413
409
if !parent. isEmpty && !fileExists( atPath: parent, isDirectory: & isDir) {
414
410
try createDirectory ( atPath: parent, withIntermediateDirectories: true , attributes: attributes)
415
411
}
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 {
417
413
let posixError = errno
418
414
if posixError == EEXIST && fileExists ( atPath: path, isDirectory: & isDir) && isDir. boolValue {
419
415
// Continue; if there is an existing file and it is a directory, that is still a success.
@@ -432,7 +428,7 @@ extension FileManager {
432
428
throw _NSErrorWithErrno ( EEXIST, reading: false , path: path)
433
429
}
434
430
} 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 {
436
432
throw _NSErrorWithErrno ( errno, reading: false , path: path)
437
433
} else if let attr = attributes {
438
434
try self . setAttributes ( attr, ofItemAtPath: path)
0 commit comments