Skip to content

Commit b0848b4

Browse files
authored
Revert "Implement FileManager.url{s,}(for:…) and NSSearchPathForDirectoriesInDomains."
1 parent f3cd96f commit b0848b4

File tree

9 files changed

+19
-777
lines changed

9 files changed

+19
-777
lines changed

Foundation.xcodeproj/project.pbxproj

-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/* Begin PBXBuildFile section */
1010
0383A1751D2E558A0052E5D1 /* TestStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0383A1741D2E558A0052E5D1 /* TestStream.swift */; };
1111
03B6F5841F15F339004F25AF /* TestURLProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B6F5831F15F339004F25AF /* TestURLProtocol.swift */; };
12-
1513A8432044893F00539722 /* FileManager_XDG.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1513A8422044893F00539722 /* FileManager_XDG.swift */; };
1312
1520469B1D8AEABE00D02E36 /* HTTPServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1520469A1D8AEABE00D02E36 /* HTTPServer.swift */; };
1413
153E951120111DC500F250BE /* CFKnownLocations.h in Headers */ = {isa = PBXBuildFile; fileRef = 153E950F20111DC500F250BE /* CFKnownLocations.h */; settings = {ATTRIBUTES = (Private, ); }; };
1514
153E951220111DC500F250BE /* CFKnownLocations.c in Sources */ = {isa = PBXBuildFile; fileRef = 153E951020111DC500F250BE /* CFKnownLocations.c */; };
@@ -516,7 +515,6 @@
516515
/* Begin PBXFileReference section */
517516
0383A1741D2E558A0052E5D1 /* TestStream.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestStream.swift; sourceTree = "<group>"; };
518517
03B6F5831F15F339004F25AF /* TestURLProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestURLProtocol.swift; sourceTree = "<group>"; };
519-
1513A8422044893F00539722 /* FileManager_XDG.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileManager_XDG.swift; sourceTree = "<group>"; };
520518
1520469A1D8AEABE00D02E36 /* HTTPServer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTTPServer.swift; sourceTree = "<group>"; };
521519
153E950F20111DC500F250BE /* CFKnownLocations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CFKnownLocations.h; sourceTree = "<group>"; };
522520
153E951020111DC500F250BE /* CFKnownLocations.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = CFKnownLocations.c; sourceTree = "<group>"; };
@@ -1824,7 +1822,6 @@
18241822
children = (
18251823
EADE0B5D1BD15DFF00C49C64 /* FileHandle.swift */,
18261824
EADE0B5E1BD15DFF00C49C64 /* FileManager.swift */,
1827-
1513A8422044893F00539722 /* FileManager_XDG.swift */,
18281825
EADE0B7A1BD15DFF00C49C64 /* Process.swift */,
18291826
5BDC3F2F1BCC5DCB00ED97BB /* Bundle.swift */,
18301827
5BDC3F411BCC5DCB00ED97BB /* ProcessInfo.swift */,
@@ -2347,7 +2344,6 @@
23472344
5BECBA3A1D1CAE9A00B39B1F /* NSMeasurement.swift in Sources */,
23482345
5BF7AEB21BCD51F9008F214A /* NSNumber.swift in Sources */,
23492346
61D2F9AF1FECFB3E0033306A /* NativeProtocol.swift in Sources */,
2350-
1513A8432044893F00539722 /* FileManager_XDG.swift in Sources */,
23512347
B9974B991EDF4A22007F15B8 /* HTTPURLProtocol.swift in Sources */,
23522348
5BCD03821D3EE35C00E3FF9B /* TimeZone.swift in Sources */,
23532349
EADE0BBC1BD15E0000C49C64 /* URLCache.swift in Sources */,
@@ -2717,7 +2713,6 @@
27172713
DYLIB_COMPATIBILITY_VERSION = 150;
27182714
DYLIB_CURRENT_VERSION = 1303;
27192715
DYLIB_INSTALL_NAME_BASE = "@rpath";
2720-
ENABLE_TESTABILITY = YES;
27212716
FRAMEWORK_VERSION = A;
27222717
GCC_PREFIX_HEADER = CoreFoundation/Base.subproj/CoreFoundation_Prefix.h;
27232718
HEADER_SEARCH_PATHS = (
@@ -2791,7 +2786,6 @@
27912786
DYLIB_COMPATIBILITY_VERSION = 150;
27922787
DYLIB_CURRENT_VERSION = 1303;
27932788
DYLIB_INSTALL_NAME_BASE = "@rpath";
2794-
ENABLE_TESTABILITY = YES;
27952789
FRAMEWORK_VERSION = A;
27962790
GCC_PREFIX_HEADER = CoreFoundation/Base.subproj/CoreFoundation_Prefix.h;
27972791
HEADER_SEARCH_PATHS = (

Foundation/FileManager.swift

+4-321
Large diffs are not rendered by default.

Foundation/FileManager_XDG.swift

-125
This file was deleted.

Foundation/NSPathUtilities.swift

+1-23
Original file line numberDiff line numberDiff line change
@@ -562,29 +562,7 @@ extension FileManager {
562562
}
563563

564564
public func NSSearchPathForDirectoriesInDomains(_ directory: FileManager.SearchPathDirectory, _ domainMask: FileManager.SearchPathDomainMask, _ expandTilde: Bool) -> [String] {
565-
let knownDomains: [FileManager.SearchPathDomainMask] = [
566-
.userDomainMask,
567-
.networkDomainMask,
568-
.localDomainMask,
569-
.systemDomainMask,
570-
]
571-
572-
var result: [URL] = []
573-
574-
for domain in knownDomains {
575-
if domainMask.contains(domain) {
576-
result.append(contentsOf: FileManager.default.urls(for: directory, in: domain))
577-
}
578-
}
579-
580-
return result.map { (url) in
581-
var path = url.absoluteURL.path
582-
if expandTilde {
583-
path = NSString(string: path).expandingTildeInPath
584-
}
585-
586-
return path
587-
}
565+
NSUnimplemented()
588566
}
589567

590568
public func NSHomeDirectory() -> String {

0 commit comments

Comments
 (0)