Hi,

I'm working on implementation of unimplemented properties in NSURL.swift.

public var filePathURL: NSURL?

As per specification[1] which says "
If the receiver is a file reference URL, this property contains a copy of the URL converted to a file path URL. If the receiver’s URL is a file path URL, this property contains the original URL. If the original URL is not a file URL, or if the resource is not reachable or no longer exists, this property contains nil. "

'filePathURL' property is to hold copy of file reference URL converted to file path URL.


for example,

file reference URL - file:///.file/id=6571367.3617528/
file path URL - file:///Users/mbvreddy/workarea/swift/MyTest/MyTest.xcodeproj/

File reference URL is a special URL on OS X which is of type
file:///.file/id=<volume_id>.<file_id>/. And it is not available on Linux. APIs that return file reference URLs [2] on OS X foundation NSURL.fileReferenceURL() is removed from Linux Foundation.

So, I think NSURL.filePathURL also should be removed as it serves no purpose without file reference URL. Any comments are appreciated.

[1] https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/#//apple_ref/occ/instp/NSURL/filePathURL
[2] https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/#//apple_ref/occ/instm/NSURL/fileReferenceURL


- mbvreddy

_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

Reply via email to