Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions SwiftFilePath.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -371,24 +371,31 @@
TargetAttributes = {
CC7832EB1A610124005E77C3 = {
CreatedOnToolsVersion = 6.1;
LastSwiftMigration = 0800;
};
CC7832F61A610125005E77C3 = {
CreatedOnToolsVersion = 6.1;
LastSwiftMigration = 0800;
};
D63BC3981C172BCD0071D0E2 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0800;
};
D63BC3A11C172BCD0071D0E2 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0800;
};
D63BC3B41C172C540071D0E2 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0800;
};
D63BC3C11C172C740071D0E2 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0800;
};
D63BC3CA1C172C740071D0E2 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0800;
};
};
};
Expand Down Expand Up @@ -657,6 +664,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "me.nori0620.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SwiftFilePath;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
};
name = Debug;
};
Expand All @@ -674,6 +682,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "me.nori0620.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SwiftFilePath;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
};
name = Release;
};
Expand All @@ -692,6 +701,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "me.nori0620.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
};
name = Debug;
};
Expand All @@ -706,6 +716,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "me.nori0620.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
};
name = Release;
};
Expand All @@ -725,6 +736,7 @@
PRODUCT_NAME = SwiftFilePath;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
Expand All @@ -747,6 +759,7 @@
PRODUCT_NAME = SwiftFilePath;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
Expand All @@ -762,6 +775,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "me.nori0620.SwiftFilePath-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 2.3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
Expand All @@ -777,6 +791,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "me.nori0620.SwiftFilePath-tvOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_VERSION = 2.3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Release;
Expand All @@ -798,6 +813,7 @@
PRODUCT_NAME = SwiftFilePath;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -821,6 +837,7 @@
PRODUCT_NAME = SwiftFilePath;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -845,6 +862,7 @@
PRODUCT_NAME = SwiftFilePath;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
};
name = Debug;
};
Expand All @@ -868,6 +886,7 @@
PRODUCT_NAME = SwiftFilePath;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
};
name = Release;
};
Expand All @@ -884,6 +903,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "me.nori0620.SwiftFilePath-MacTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 2.3;
};
name = Debug;
};
Expand All @@ -901,6 +921,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "me.nori0620.SwiftFilePath-MacTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 2.3;
};
name = Release;
};
Expand Down Expand Up @@ -941,6 +962,7 @@
D63BC3AC1C172BCD0071D0E2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D63BC3AD1C172BCD0071D0E2 /* Build configuration list for PBXNativeTarget "SwiftFilePath-tvOS Tests" */ = {
isa = XCConfigurationList;
Expand All @@ -949,6 +971,7 @@
D63BC3AF1C172BCD0071D0E2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D63BC3BA1C172C540071D0E2 /* Build configuration list for PBXNativeTarget "SwiftFilePath-watchOS" */ = {
isa = XCConfigurationList;
Expand All @@ -957,6 +980,7 @@
D63BC3BC1C172C540071D0E2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D63BC3D31C172C740071D0E2 /* Build configuration list for PBXNativeTarget "SwiftFilePath-Mac" */ = {
isa = XCConfigurationList;
Expand All @@ -965,6 +989,7 @@
D63BC3D51C172C740071D0E2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D63BC3D61C172C740071D0E2 /* Build configuration list for PBXNativeTarget "SwiftFilePath-Mac Tests" */ = {
isa = XCConfigurationList;
Expand All @@ -973,6 +998,7 @@
D63BC3D81C172C740071D0E2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
4 changes: 2 additions & 2 deletions SwiftFilePath/PathExtensionDir.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ extension Path: SequenceType {
public func content(path_string:NSString) -> Path {
return Path(
NSURL(fileURLWithPath: self.path_string)
.URLByAppendingPathComponent( path_string as String )
.URLByAppendingPathComponent( path_string as String )!
.path!
)
}
Expand Down Expand Up @@ -102,7 +102,7 @@ extension Path: SequenceType {
public func generate() -> AnyGenerator<Path> {
assert(self.isDir,"To get iterator, path must be dir< \(path_string) >")
let iterator = fileManager.enumeratorAtPath(path_string)
return anyGenerator() {
return AnyGenerator() {
let optionalContent = iterator?.nextObject() as! String?
if let content = optionalContent {
return self.content(content)
Expand Down
6 changes: 3 additions & 3 deletions SwiftFilePathTests/SwiftFilePathTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ class SwiftFilePathTests: XCTestCase {

for content in sandboxDir {
XCTAssertTrue(content.exists)
contentCount++
if( content.isDir ){ dirCount++ }
contentCount += 1
if( content.isDir ){ dirCount += 1 }
}
XCTAssertEqual( contentCount, 3)
XCTAssertEqual( dirCount, 1)
Expand Down Expand Up @@ -460,4 +460,4 @@ class SwiftFilePathTests: XCTestCase {
}
}

}
}