<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"> <span>Hi Rainer,<br><br>Thank you for your inputs. I'll implement it to return file URL (as no conversion is required for open source foundation).<br><br>-mbvreddy<br></span><br><font color="#990099"><a target="_blank" href="mailto:-----swift-corelibs-dev-bounces@swift.org">-----swift-corelibs-dev-bounces@swift.org</a> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">To: <a target="_blank" href="mailto:swift-corelibs-dev@swift.org">swift-corelibs-dev@swift.org</a><br>From: Rainer Brockerhoff via swift-corelibs-dev <swift-corelibs-dev@swift.org><br>Sent by: <a target="_blank" href="mailto:swift-corelibs-dev-bounces@swift.org">swift-corelibs-dev-bounces@swift.org</a><br>Date: 05/07/2016 08:35PM<br>Subject: Re: [swift-corelibs-dev] removal of NSURL.filePathURL as it serves no purpose without file reference URL in Linux<br><br><div><font face="Courier New,Courier,monospace" size="2">On 5/7/16 08:07, Bhaktavatsal R Maram via swift-corelibs-dev wrote:<br>> I'm working on implementation of unimplemented properties in NSURL.swift.<br>> <br>> /public var filePathURL: NSURL?/<br>> <br>> As per specification[1] which says "If the receiver is a file reference URL, <br>> this property contains a copy of the URL converted to a file path URL. If the <br>> receiver’s URL is a file path URL, this property contains the original URL. If <br>> the original URL is not a file URL, or if the resource is not reachable or no <br>> longer exists, this property contains |nil|. "<br>> <br>> 'filePathURL' property is to hold copy of file reference URL converted to file <br>> path URL.<br>> <br>> <br>> for example,<br>> <br>> file reference URL - *file:///.file/id=6571367.3617528/*<br>> file path URL - *file:///Users/mbvreddy/workarea/swift/MyTest/MyTest.xcodeproj/*<br>> <br>> File reference URL is a special URL on OS X which is of type <br>> <a href="file:///.file/id=">file:///.file/id=</a><volume_id>.<file_id>/. And it is not available on Linux. APIs <br>> that return file reference URLs [2] on OS X foundation NSURL.fileReferenceURL() <br>> is removed from Linux Foundation.<br><br>AFAIK this particular format of file reference URLs is an OS X<br>implementation detail, and should not be relied upon (nor is it, I<br>think, supported on certain file systems).<br><br>One reason for it, no doubt, is to be able to use low-level file system<br>APIs independently of things like maximum path length or POSIX working<br>file directory.<br><br>Nothing precludes an implementation on another platform that leverages<br>per-file identifiers analogous to volume and file id — or you may even<br>have a trivial implementation that just stores the full path from<br>fileSystemImplementation.<br><br><br>> So, I think NSURL.filePathURL also should be removed as it serves no purpose <br>> without file reference URL. Any comments are appreciated.<br><br>I'm not a Linux user but this will probably unduly restrict<br>cross-platform apps. Using file reference URLs is quite common,<br>especially if at some point you need a path to pass to a POSIX API.<br><br>-- <br>Rainer Brockerhoff <<a target="_blank" href="mailto:rainer@brockerhoff.net">rainer@brockerhoff.net</a>><br>Belo Horizonte, Brazil<br>"In the affairs of others even fools are wise<br>In their own business even sages err."<br><a href="http://brockerhoff.net/blog/">http://brockerhoff.net/blog/</a><br><br>_______________________________________________<br>swift-corelibs-dev mailing list<br><a target="_blank" href="mailto:swift-corelibs-dev@swift.org">swift-corelibs-dev@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br></font></div></swift-corelibs-dev@swift.org></div></div></font><BR>