NSURL Mac OS X 10.0

NSURL is a class that represents a URLthe human-readable host names and paths that various networking clients use to locate both remote resources over a network, or resources on the local filesystem. Core Foundation has a type, CFURL, that is toll-free bridged to NSURL, and as such the two types can be used interchangeably.


@interface NSURL : NSObject
 // Accessor Methods
   - (BOOL)setResourceData:(NSData *)data;
   - (BOOL)setProperty:(id)property forKey:(NSString *)propertyKey;
 // Class Methods
   + (NSURL *)URLFromPasteboard:(NSPasteboard *)pasteBoard;
   + (id)URLWithString:(NSString *)URLString;
   + (id)URLWithString:(NSString *)URLString relativeToURL:(NSURL *)baseURL;
   + (id)fileURLWithPath:(NSString *)path;
 // Instance Methods
   - (NSURLHandle *)URLHandleUsingCache:(BOOL)shouldUseCache;
   - (id) initWithString:(NSString *)URLString;
   - (id) initWithString:(NSString *)URLString relativeToURL:(NSURL *)baseURL;
   - (NSString *)absoluteString;
   - (NSURL *)absoluteURL;
   - (NSURL *)baseURL;
   - (NSString *)fragment;
   - (NSString *)host;
   - (BOOL)isFileURL;
   - (void)loadResourceDataNotifyingClient:(id)client usingCache:(BOOL)shouldUseCache;
   - (NSString *)parameterString;
   - (NSString *)password;
   - (id) initFileURLWithPath:(NSString *)path;
   - (NSString *)path;
   - (NSNumber *)port;
   - (id)propertyForKey:(NSString *)propertyKey;
   - (NSString *)query;
   - (NSString *)relativePath;
   - (NSString *)relativeString;
   - (NSData *)resourceDataUsingCache:(BOOL)shouldUseCache;
   - (NSString *)resourceSpecifier;
   - (NSString *)scheme;
   - (id) initWithScheme:(NSString *)scheme host:(NSString *)host path:(NSString *)path;
   - (NSURL *)standardizedURL;
   - (NSString *)user;
   - (void)writeToPasteboard:(NSPasteboard *)pasteBoard;

    Part II: API Quick Reference
    Chapter 13. Foundation Classes