In the class of Swift URLthere .standardizedand .absoluteURL( .standardizedURLand .absoluteURLand .URLByStandardizingPathin Objective-C NSURL). There also .standardizedFileURL.
I have no idea what the difference is between all of these, but there must be one, since they provide all of them, right? I mean, it is .standardizedFileURLintended only for processing file URLs, but other than that (for example, if everyone is called by file URL), what's the difference?
From the above documents:
Swift
standardized
Returns the URL with any instances of ".." or ".". removed from his path.
absolute url
Returns an absolute URL.
Discussion
If the URL itself is absolute, it will return self.
URL
URL- .
isFileURL - false, self.
Objective-C
URL
URL- ".." ".". . ( )
NSURL, , ".." ".". RFC 1808, nil.
URL
URL-, , . ( )
URL- , . RFC 1808.
URLBy
URL, , URL, . ( )
URL- : . URL- URL-.
stringByStandardizingPath, URL:
, stringByExpandingTildeInPath. ( "//" "/./" ) . ( ".." ) , , stringByResolvingSymlinksInPath, .
, , . "/private" , ( ).
, , , . , ( , , URL-).