File tree 2 files changed +96
-102
lines changed
2 files changed +96
-102
lines changed Original file line number Diff line number Diff line change @@ -96,18 +96,18 @@ public protocol FileManagerType {
96
96
func isRootDir( _ url: URL ) -> Bool
97
97
func isEmptyDirectory( _ url: URL ) -> Bool
98
98
func isCrossMountPoint( _ url: URL ) throws -> Bool
99
-
99
+
100
100
func fileType( _ url: URL ) -> FileAttributeType ?
101
101
func subpaths( atPath path: String , enumerator handler: ( String ) -> Bool )
102
102
}
103
103
104
104
extension FileManager : FileManagerType {
105
-
105
+
106
106
public func trashItem( at url: URL ) throws {
107
107
Logger . verbose ( " rmtrash: \( url. path) " )
108
108
try trashItem ( at: url, resultingItemURL: nil )
109
109
}
110
-
110
+
111
111
public func isRootDir( _ url: URL ) -> Bool {
112
112
return url. standardizedFileURL. path == " / "
113
113
}
@@ -125,7 +125,7 @@ extension FileManager: FileManagerType {
125
125
let urlVol = try url. resourceValues ( forKeys: [ URLResourceKey . volumeURLKey] )
126
126
return curVol. volume != urlVol. volume
127
127
}
128
-
128
+
129
129
public func fileType( _ url: URL ) -> FileAttributeType ? {
130
130
guard let attr = try ? attributesOfItem ( atPath: url. path) else {
131
131
return nil
You can’t perform that action at this time.
0 commit comments