To add to Visput and Wain's answers.
In your code you may be returning a file or directory path that is in the form of a NSURL from another method
An example would be the returned selection of a NSOpenPanel.
It is alos easier to access the parts that make up the path in an  URL than it is in a string path
NSFileManager gives you the convenience method to use a NSURL that you already have from some where else.
Read up on NSURL 
Overview
An NSURL object represents a URL that can potentially contain the
  location of a resource on a remote server, the path of a local file on
  disk, or even an arbitrary piece of encoded data.
You can use URL objects to construct URLs and access their parts. For
  URLs that represent local files, you can also manipulate properties of
  those files directly, such as changing the file’s last modification
  date. Finally, you can pass URL objects to other APIs to retrieve the
  contents of those URLs. For example, you can use the NSURLSession,
  NSURLConnection, and NSURLDownload classes to access the contents of
  remote resources, as described in URL Loading System Programming
  Guide.
URL objects are the preferred way to refer to local files. Most AppKit
  objects that read data from or write data to a file have methods that
  accept an NSURL object instead of a pathname as the file reference.
  For example, you can get the contents of a local file URL as an
  NSString object by calling the stringWithContentsOfURL:encoding:error:
  method, or as an NSData object by calling the
  dataWithContentsOfURL:options:error: method.
You can also use URLs for interapplication communication. In OS X, the
  NSWorkspace class provides the openURL: method to open a location
  specified by a URL. Similarly, in iOS, the UIApplication class
  provides the openURL: method.
Additionally, you can use URLs when working with pasteboards, as
  described in NSURL Additions Reference (part of the AppKit framework).