![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /proc/self/root/usr/share/doc/gnustep-base-doc/Base/Reference/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>NSURL class reference</title> </head> <body> <font face="serif"> <a href="Base.html">Up</a> <br /> <h1><a name="title$NSURL">NSURL class reference</a></h1> <h3>Authors</h3> <dl> <dt>Manuel Guesdon (<a href="mailto:mguesdon@sbuilders.com"><code>mguesdon@sbuilders.com</code></a>)</dt> <dd> </dd> <dt>Richard Frith-Macdonald (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt> <dd> </dd> </dl> <p><b>Copyright:</b> (C) 1999 Free Software Foundation, Inc.</p> <div> <hr width="50%" align="left" /> <h3>Contents -</h3> <ol> <li> <a href="#001000000000">Software documentation for the NSURL class</a> </li> <li> <a href="#002000000000">Software documentation for the NSObject(NSURLClient) category</a> </li> </ol> <hr width="50%" align="left" /> </div> <h1><a name="001000000000"> Software documentation for the NSURL class </a></h1> <h2><a name="class$NSURL">NSURL</a> : <a rel="gsdoc" href="NSObject.html#class$NSObject">NSObject</a></h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>Foundation/NSURL.h</dd> </dl> </blockquote> <blockquote> <dl> <dt><b>Conforms to:</b></dt> <dd><a rel="gsdoc" href="NSObject.html#protocol$(NSCoding)">NSCoding</a></dd> <dd><a rel="gsdoc" href="NSObject.html#protocol$(NSCopying)">NSCopying</a></dd> <dd><a rel="gsdoc" href="NSURLHandle.html#protocol$(NSURLHandleClient)">NSURLHandleClient</a></dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> This class permits manipulation of URLs and the resources to which they refer. They can be used to represent absolute URLs or relative URLs which are based upon an absolute URL. The relevant RFCs describing how a URL is formatted, and what is legal in a URL are - 1808, 1738, and 2396. <br /> Handling of the underlying resources is carried out by NSURLHandle objects, but NSURL provides a simplified API wrapping these objects. </div> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="NSURL.html#method$NSURL+URLByResolvingAliasFileAtURL$options$error$">+URLByResolvingAliasFileAtURL:options:error:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL+URLWithString$">+URLWithString:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL+URLWithString$relativeToURL$">+URLWithString:relativeToURL:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL+fileURLWithPath$">+fileURLWithPath:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL+fileURLWithPath$isDirectory$">+fileURLWithPath:isDirectory:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL+fileURLWithPathComponents$">+fileURLWithPathComponents:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-URLByAppendingPathComponent$">-URLByAppendingPathComponent:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-URLByAppendingPathExtension$">-URLByAppendingPathExtension:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-URLByDeletingLastPathComponent">-URLByDeletingLastPathComponent</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-URLByDeletingPathExtension">-URLByDeletingPathExtension</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-URLByResolvingSymlinksInPath">-URLByResolvingSymlinksInPath</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-URLByStandardizingPath">-URLByStandardizingPath</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-URLHandleUsingCache$">-URLHandleUsingCache:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-absoluteString">-absoluteString</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-absoluteURL">-absoluteURL</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-baseURL">-baseURL</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-checkResourceIsReachableAndReturnError$">-checkResourceIsReachableAndReturnError:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-fragment">-fragment</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-getResourceValue$forKey$error$">-getResourceValue:forKey:error:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-host">-host</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-initFileURLWithPath$">-initFileURLWithPath:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-initFileURLWithPath$isDirectory$">-initFileURLWithPath:isDirectory:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-initWithScheme$host$path$">-initWithScheme:host:path:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-initWithString$">-initWithString:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-initWithString$relativeToURL$">-initWithString:relativeToURL:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-isFileURL">-isFileURL</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-lastPathComponent">-lastPathComponent</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-loadResourceDataNotifyingClient$usingCache$">-loadResourceDataNotifyingClient:usingCache:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-parameterString">-parameterString</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-password">-password</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-path">-path</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-pathComponents">-pathComponents</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-pathExtension">-pathExtension</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-port">-port</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-propertyForKey$">-propertyForKey:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-query">-query</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-relativePath">-relativePath</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-relativeString">-relativeString</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-resourceDataUsingCache$">-resourceDataUsingCache:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-resourceSpecifier">-resourceSpecifier</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-scheme">-scheme</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-setProperty$forKey$">-setProperty:forKey:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-setResourceData$">-setResourceData:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-standardizedURL">-standardizedURL</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSURL-user">-user</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$NSURL+URLByResolvingAliasFileAtURL$options$error$">URLByResolvingAliasFileAtURL: options: error: </a></h3> + (id) <b>URLByResolvingAliasFileAtURL:</b> (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*)url<b> options:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSURLBookmarkResolutionOptions">NSURLBookmarkResolutionOptions</a>)options<b> error:</b> (<a rel="gsdoc" href="NSError.html#class$NSError">NSError</a>**)error;<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL+URLWithString$">URLWithString: </a></h3> + (id) <b>URLWithString:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aUrlString;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Create and return a URL with the supplied string, which should be a string (containing percent escape codes where necessary) conforming to the description (in RFC2396) of an absolute URL. <br /> Calls <a rel="gsdoc" href="#method$NSURL-initWithString$"> -initWithString: </a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL+URLWithString$relativeToURL$">URLWithString: relativeToURL: </a></h3> + (id) <b>URLWithString:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aUrlString<b> relativeToURL:</b> (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*)aBaseUrl;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Create and return a URL with the supplied string, which should be a string (containing percent escape codes where necessary) conforming to the description (in RFC2396) of a relative URL. <br /> Calls <a rel="gsdoc" href="#method$NSURL-initWithString$relativeToURL$"> -initWithString:relativeToURL: </a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL+fileURLWithPath$">fileURLWithPath: </a></h3> + (id) <b>fileURLWithPath:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aPath;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Create and return a file URL with the supplied path. <br /> The value of <var>aPath</var> must be a valid filesystem path. <br /> Calls <a rel="gsdoc" href="#method$NSURL-initFileURLWithPath$"> -initFileURLWithPath: </a> which escapes characters in the path where necessary. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL+fileURLWithPath$isDirectory$">fileURLWithPath: isDirectory: </a></h3> + (id) <b>fileURLWithPath:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aPath<b> isDirectory:</b> (BOOL)isDir;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.5.0</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL+fileURLWithPathComponents$">fileURLWithPathComponents: </a></h3> + (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>fileURLWithPathComponents:</b> (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*)components;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Creates a file URL using a path built from <var>components</var>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-URLByAppendingPathComponent$">URLByAppendingPathComponent: </a></h3> - (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>URLByAppendingPathComponent:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)pathComponent;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Returns a URL formed by adding a path component to the path of the receiver. <br /> See <a rel="gsdoc" href="NSString.html#method$NSString-stringByAppendingPathComponent$">[NSString -stringByAppendingPathComponent:]</a> . </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-URLByAppendingPathExtension$">URLByAppendingPathExtension: </a></h3> - (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>URLByAppendingPathExtension:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)pathExtension;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Returns a URL formed by adding a path extension to the path of the receiver. <br /> See <a rel="gsdoc" href="NSString.html#method$NSString-stringByAppendingPathExtension$">[NSString -stringByAppendingPathExtension:]</a> . </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-URLByDeletingLastPathComponent">URLByDeletingLastPathComponent </a></h3> - (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>URLByDeletingLastPathComponent</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Returns a URL formed by removing a path component from the path of the receiver. <br /> See <a rel="gsdoc" href="NSString.html#method$NSString-stringByDeletingLastPathComponent">[NSString -stringByDeletingLastPathComponent]</a> . </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-URLByDeletingPathExtension">URLByDeletingPathExtension </a></h3> - (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>URLByDeletingPathExtension</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Returns a URL formed by removing an extension from the path of the receiver. <br /> See <a rel="gsdoc" href="NSString.html#method$NSString-stringByDeletingPathExtension">[NSString -stringByDeletingPathExtension]</a> . </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-URLByResolvingSymlinksInPath">URLByResolvingSymlinksInPath </a></h3> - (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>URLByResolvingSymlinksInPath</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Returns self unless the receiver is a file URL, in which case it returns a URL formed by calling <a rel="gsdoc" href="NSString.html#method$NSString-stringByResolvingSymlinksInPath">[NSString -stringByResolvingSymlinksInPath]</a> . </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-URLByStandardizingPath">URLByStandardizingPath </a></h3> - (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>URLByStandardizingPath</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Returns self unless the receiver is a file URL, in which case it returns a URL formed by calling <a rel="gsdoc" href="NSString.html#method$NSString-stringByStandardizingPath">[NSString -stringByStandardizingPath]</a> . </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-URLHandleUsingCache$">URLHandleUsingCache: </a></h3> - (<a rel="gsdoc" href="NSURLHandle.html#class$NSURLHandle">NSURLHandle</a>*) <b>URLHandleUsingCache:</b> (BOOL)shouldUseCache;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns an NSURLHandle instance which may be used to write data to the resource represented by the receiver URL, or read data from it. <br /> The <var>shouldUseCache</var> flag indicates whether a cached handle may be returned or a new one should be created. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-absoluteString">absoluteString </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>absoluteString</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the full string describing the receiver resolved against its base. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-absoluteURL">absoluteURL </a></h3> - (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>absoluteURL</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> If the receiver is an absolute URL, returns self. Otherwise returns an absolute URL referring to the same resource as the receiver. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-baseURL">baseURL </a></h3> - (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>baseURL</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> If the receiver is a relative URL, returns its base URL. <br /> Otherwise, returns <code>nil</code>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-checkResourceIsReachableAndReturnError$">checkResourceIsReachableAndReturnError: </a></h3> - (BOOL) <b>checkResourceIsReachableAndReturnError:</b> (<a rel="gsdoc" href="NSError.html#class$NSError">NSError</a>**)error;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Attempts to load from the specified URL and provides an <var>error</var> response if the data is unrachable. <br /> Returns <code>YES</code> on success, <code>NO</code> on failure. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-fragment">fragment </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>fragment</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the fragment portion of the receiver or <code>nil</code> if there is no fragment supplied in the URL. <br /> The fragment is everything in the original URL string after a '#' <br /> File URLs do not have fragments. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-getResourceValue$forKey$error$">getResourceValue: forKey: error: </a></h3> - (BOOL) <b>getResourceValue:</b> (id*)value<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)key<b> error:</b> (<a rel="gsdoc" href="NSError.html#class$NSError">NSError</a>**)error;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-host">host </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>host</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the host portion of the receiver or <code>nil</code> if there is no host supplied in the URL. <br /> Percent escape sequences in the user string are translated and the string treated as UTF8. <br /> Returns IPv6 addresses <em>without</em> the enclosing square brackets required (by RFC2732) in URL strings. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-initFileURLWithPath$">initFileURLWithPath: </a></h3> - (id) <b>initFileURLWithPath:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aPath;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Initialise as a file URL with the specified path (which must be a valid path on the local filesystem). <br /> Raises NSInvalidArgumentException if <var>aPath</var> is <code>nil</code>. <br /> Converts relative paths to absolute ones. <br /> Appends a trailing slash to the path when necessary if it specifies a directory. <br /> Calls <a rel="gsdoc" href="#method$NSURL-initWithScheme$host$path$"> -initWithScheme:host:path: </a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-initFileURLWithPath$isDirectory$">initFileURLWithPath: isDirectory: </a></h3> - (id) <b>initFileURLWithPath:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aPath<b> isDirectory:</b> (BOOL)isDir;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.5.0</div> <br /> <div class="desc"> Initialise as a file URL with the specified path (which must be a valid path on the local filesystem). <br /> Raises NSInvalidArgumentException if <var>aPath</var> is <code>nil</code>. <br /> Converts relative paths to absolute ones. <br /> Appends a trailing slash to the path when necessary if it specifies a directory. <br /> Calls <a rel="gsdoc" href="#method$NSURL-initWithScheme$host$path$"> -initWithScheme:host:path: </a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-initWithScheme$host$path$">initWithScheme: host: path: </a></h3> - (id) <b>initWithScheme:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aScheme<b> host:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aHost<b> path:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aPath;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Initialise by building a URL string from the supplied parameters and calling <a rel="gsdoc" href="#method$NSURL-initWithString$relativeToURL$"> -initWithString:relativeToURL: </a> <br /> This method adds percent escapes to <var>aPath</var> if it contains characters which need escaping. <br /> Accepts RFC2732 style IPv6 host addresses either with or without the enclosing square brackets (MacOS-X at least up to version 10.5 does not handle these correctly, but GNUstep does). <br /> Permits the 'aHost' part to contain 'username:password@host:port' or 'host:port' in addition to a simple host name or address. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-initWithString$">initWithString: </a></h3> - (id) <b>initWithString:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aUrlString;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Initialise as an absolute URL. <br /> Calls <a rel="gsdoc" href="#method$NSURL-initWithString$relativeToURL$"> -initWithString:relativeToURL: </a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-initWithString$relativeToURL$">initWithString: relativeToURL: </a></h3> - (id) <b>initWithString:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)aUrlString<b> relativeToURL:</b> (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*)aBaseUrl;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> This is a designated initialiser for the class.<br /> <div class="desc"> Initialised using <var>aUrlString</var> and <var>aBaseUrl</var>. The value of <var>aBaseUrl</var> may be <code>nil</code>, but <var>aUrlString</var> must be non-nil. <br /> Accepts RFC2732 style IPv6 host addresses. <br /> Parses a string wihthout a scheme as a simple path. <br /> Parses an empty string as an empty path. <br /> If the string cannot be parsed the method returns <code>nil</code>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-isFileURL">isFileURL </a></h3> - (BOOL) <b>isFileURL</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-lastPathComponent">lastPathComponent </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>lastPathComponent</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Returns the last (rightmost) path component of the receiver. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-loadResourceDataNotifyingClient$usingCache$">loadResourceDataNotifyingClient: usingCache: </a></h3> - (void) <b>loadResourceDataNotifyingClient:</b> (id)client<b> usingCache:</b> (BOOL)shouldUseCache;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Loads resource data for the specified <var>client</var>. </p> <p> If <var>shouldUseCache</var> is <code>YES</code> then an attempt will be made to locate a cached NSURLHandle to provide the resource data, otherwise a new handle will be created and cached. </p> <p> </p> <p> If the handle does not have the data available, it will be asked to load the data in the background by calling its loadInBackground method. </p> <p> </p> <p> The specified <var>client</var> (if non-nil) will be set up to receive notifications of the progress of the background load process. </p> <p> </p> <p> The processes current run loop must be run in order for the background load operation to operate! </p> <p> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-parameterString">parameterString </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>parameterString</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the parameter portion of the receiver or <code>nil</code> if there is no parameter supplied in the URL. <br /> The parameters are everything in the original URL string after a ';' but before the query. <br /> File URLs do not have parameters. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-password">password </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>password</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the password portion of the receiver or <code>nil</code> if there is no password supplied in the URL. <br /> Percent escape sequences in the user string are translated and the string treated as UTF8 in GNUstep but this appears to be broken in MacOS-X. <br /> NB. because of its security implications it is recommended that you do not use URLs with users and passwords unless necessary. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-path">path </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>path</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the path portion of the receiver. <br /> Replaces percent escapes with unescaped values, interpreting non-ascii character sequences as UTF8. <br /> NB. This does not conform strictly to the RFCs, in that it includes a leading slash ('/') character (whereas the path part of a URL strictly should not) and the interpretation of non-ascii character is (strictly speaking) undefined. <br /> Also, this breaks strict conformance in that a URL of file scheme is treated as having a path (contrary to RFCs) </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-pathComponents">pathComponents </a></h3> - (<a rel="gsdoc" href="NSArray.html#class$NSArray">NSArray</a>*) <b>pathComponents</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Returns thepath components of the receiver. <br /> See <a rel="gsdoc" href="NSString.html#method$NSString-pathComponents"> [NSString -pathComponents] </a> . </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-pathExtension">pathExtension </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>pathExtension</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.6.0</div> <br /> <div class="desc"> Returns the file extension (text after the rightmost dot in the path) of the receiver. <br /> see <a rel="gsdoc" href="NSString.html#method$NSString-pathExtension"> [NSString -pathExtension] </a> . </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-port">port </a></h3> - (<a rel="gsdoc" href="NSValue.html#class$NSNumber">NSNumber</a>*) <b>port</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the port portion of the receiver or <code>nil</code> if there is no port supplied in the URL. <br /> Percent escape sequences in the user string are translated in GNUstep but this appears to be broken in MacOS-X. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-propertyForKey$">propertyForKey: </a></h3> - (id) <b>propertyForKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)propertyKey;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Asks a URL handle to return the property for the specified key and returns the result. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-query">query </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>query</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the query portion of the receiver or <code>nil</code> if there is no query supplied in the URL. <br /> The query is everything in the original URL string after a '?' but before the fragment. <br /> File URLs do not have queries. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-relativePath">relativePath </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>relativePath</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the path of the receiver, without taking any base URL into account. If the receiver is an absolute URL, <a rel="gsdoc" href="#method$NSURL-relativePath"> -relativePath </a> is the same as <a rel="gsdoc" href="#method$NSURL-path">-path</a> . <br /> Returns <code>nil</code> if there is no path specified for the URL. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-relativeString">relativeString </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>relativeString</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the relative portion of the URL string. If the receiver is not a relative URL, this returns the same as absoluteString. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-resourceDataUsingCache$">resourceDataUsingCache: </a></h3> - (<a rel="gsdoc" href="NSData.html#class$NSData">NSData</a>*) <b>resourceDataUsingCache:</b> (BOOL)shouldUseCache;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Loads the resource data for the represented URL and returns the result. The <var>shouldUseCache</var> flag determines whether data previously retrieved by an existing NSURLHandle can be used to provide the data, or if it should be refetched. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-resourceSpecifier">resourceSpecifier </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>resourceSpecifier</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the resource specifier of the URL... the part which lies after the scheme. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-scheme">scheme </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>scheme</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the scheme of the receiver. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-setProperty$forKey$">setProperty: forKey: </a></h3> - (BOOL) <b>setProperty:</b> (id)property<b> forKey:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)propertyKey;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Calls <a rel="gsdoc" href="NSURLHandle.html#method$NSURLHandle-writeProperty$forKey$">[NSURLHandle -writeProperty:forKey:]</a> to set the named <var>property</var>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-setResourceData$">setResourceData: </a></h3> - (BOOL) <b>setResourceData:</b> (<a rel="gsdoc" href="NSData.html#class$NSData">NSData</a>*)data;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Calls <a rel="gsdoc" href="NSURLHandle.html#method$NSURLHandle-writeData$"> [NSURLHandle -writeData:] </a> to write the specified <var>data</var> object to the resource identified by the receiver URL. <br /> Returns the result. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-standardizedURL">standardizedURL </a></h3> - (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*) <b>standardizedURL</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns a URL with '/./' and '/../' sequences resolved etc. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSURL-user">user </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>user</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the user portion of the receiver or <code>nil</code> if there is no user supplied in the URL. <br /> Percent escape sequences in the user string are translated and the whole is treated as UTF8 data. <br /> NB. because of its security implications it is recommended that you do not use URLs with users and passwords unless necessary. </div> <hr width="25%" align="left" /> </div> <h1><a name="002000000000"> Software documentation for the NSObject(NSURLClient) category </a></h1> <h2><a rel="gsdoc" href="NSObject.html#class$NSObject">NSObject</a>(<a name="category$NSObject(NSURLClient)">NSURLClient</a>)</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>Foundation/NSURL.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> An informal protocol to which clients may conform if they wish to be notified of the progress in loading a URL for them. NSURL conforms to this protocol but all methods are implemented as no-ops. See also the <a rel="gsdoc" href="NSURLHandle.html#protocol$(NSURLHandleClient)"><NSURLHandleClient></a> protocol. </div> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="NSURL.html#method$NSObject(NSURLClient)-URL$resourceDataDidBecomeAvailable$">-URL:resourceDataDidBecomeAvailable:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSObject(NSURLClient)-URL$resourceDidFailLoadingWithReason$">-URL:resourceDidFailLoadingWithReason:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSObject(NSURLClient)-URLResourceDidCancelLoading$">-URLResourceDidCancelLoading:</a></li> <li><a rel="gsdoc" href="NSURL.html#method$NSObject(NSURLClient)-URLResourceDidFinishLoading$">-URLResourceDidFinishLoading:</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$NSObject(NSURLClient)-URL$resourceDataDidBecomeAvailable$">URL: resourceDataDidBecomeAvailable: </a></h3> - (void) <b>URL:</b> (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*)sender<b> resourceDataDidBecomeAvailable:</b> (<a rel="gsdoc" href="NSData.html#class$NSData">NSData</a>*)newBytes;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> An empty method provided for subclasses to override.<br /> <div class="desc"> Some data has become available. Note that this does not mean that all data has become available, only that a chunk of data has arrived. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSObject(NSURLClient)-URL$resourceDidFailLoadingWithReason$">URL: resourceDidFailLoadingWithReason: </a></h3> - (void) <b>URL:</b> (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*)sender<b> resourceDidFailLoadingWithReason:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)reason;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> An empty method provided for subclasses to override.<br /> <div class="desc"> Loading of resource data has failed, for given human-readable <var>reason</var>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSObject(NSURLClient)-URLResourceDidCancelLoading$">URLResourceDidCancelLoading: </a></h3> - (void) <b>URLResourceDidCancelLoading:</b> (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*)sender;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> An empty method provided for subclasses to override.<br /> <div class="desc"> Loading of resource data was cancelled by programmatic request (not an error). </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSObject(NSURLClient)-URLResourceDidFinishLoading$">URLResourceDidFinishLoading: </a></h3> - (void) <b>URLResourceDidFinishLoading:</b> (<a rel="gsdoc" href="#class$NSURL">NSURL</a>*)sender;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> An empty method provided for subclasses to override.<br /> <div class="desc"> Loading of resource data is complete. </div> <hr width="25%" align="left" /> </div> <br /> <a href="Base.html">Up</a> </font> </body> </html>