mguesdon@sbuilders.com
)rfm@gnu.org
)Version: 1.39
Date: 2004/05/12 17:17:53
Copyright: (C) 1999 Free Software Foundation, Inc.
- Declared in:
- Foundation/NSURL.h
- Conforms to:
- NSCoding
- NSCopying
- NSURLHandleClient
Standards:
- MacOS-X
- NotOpenStep
- GNUstep
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.
Handling of the underlying resources is carried out
by NSURLHandle objects, but NSURL provides a simoplified
API wrapping these objects.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
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.
Calls
-initWithString:
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.
Calls
-initWithString:relativeToURL:
Create and return a file URL with the supplied path.
The value of aPath must be a valid
filesystem path.
Calls
-initFileURLWithPath:
Returns an NSURLHandle instance which may be used
to write data to the resource represented by the
receiver URL, or read data from it.
The
shouldUseCache flag indicates whether a
cached handle may be returned or a new one should be
created.
Returns the full string describing the receiver resiolved against its base.
If the receiver is an absolute URL, returns self. Otherwise returns an absolute URL referring to the same resource as the receiver.
If the receiver is a relative URL, returns its base URL.
Otherwise, returns nil
.
Returns the fragment portion of the receiver or
nil
if there is no fragment supplied in
the URL.
The fragment is everything in the
original URL string after a '#'
File URLs
do not have fragments.
Returns the host portion of the receiver or
nil
if there is no host supplied in the
URL.
Percent escape sequences in the user
string are translated and the string treated as
UTF8.
Initialise as a file URL with the specified path
(which must be a valid path on the local
filesystem).
Converts relative paths to
absolute ones.
Appends a trailing slash to
the path when necessary if it specifies a directory.
Calls
-initWithScheme:host:path:
Initialise by building a URL string from the supplied parameters and calling -initWithString:relativeToURL:
Initialise as an absolute URL.
Calls
-initWithString:relativeToURL:
Initialised using aUrlString and
aBaseUrl. The value of aBaseUrl
may be nil
, but aUrlString must
be non-nil.
If the string cannot be parsed the
method returns nil
.
Returns YES
if the recevier is a file
URL, NO
otherwise.
Loads resource data for the specified client.
If shouldUseCache is YES
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.
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.
The specified client (if non-nil) will be set up to receive notifications of the progress of the background load process.
The processes current run loop must be run in order for the background load operation to operate!
Returns the parameter portion of the receiver or
nil
if there is no parameter supplied
in the URL.
The parameters are everything in the
original URL string after a ';' but before the
query.
File URLs do not have parameters.
Returns the password portion of the receiver or
nil
if there is no password supplied in
the URL.
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.
NB. because of its security implications it
is recommended that you do not use URLs with users and
passwords unless necessary.
Returns the path portion of the receiver.
Replaces percent escapes with unescaped values,
interpreting non-ascii character sequences as
UTF8.
NB. This does not conform strictly to
the RFCs, in that it includes a leading slash ('/')
character (wheras the path part of a URL strictly
should not) and the interpretation of non-ascii
character is (strictly speaking) undefined.
Also, this breaks strict conformance in that
a URL of file scheme is treated as having a path
(contrary to RFCs)
Returns the port portion of the receiver or
nil
if there is no port supplied in the
URL.
Percent escape sequences in the user
string are translated in GNUstep but this appears to
be broken in MacOS-X.
Asks a URL handle to return the property for the specified key and returns the result.
Returns the query portion of the receiver or
nil
if there is no query supplied in
the URL.
The query is everything in the original
URL string after a '?' but before the fragment.
File URLs do not have queries.
Returns the path of the receiver, without taking
any base URL into account. If the receiver is an
absolute URL,
-relativePath
is the same as -path
.
Returns nil
if there is no path
specified for the URL.
Returns the relative portion of the URL string. If the receiver is not a relative URL, this returns the same as absoluteString.
Loads the resource data for the represented URL and returns the result. The shouldUseCache flag determines whether an existing cached NSURLHandle can be used to provide the data.
Returns the resource specifier of the URL... the part which lies after the scheme.
Returns the scheme of the receiver.
Calls [NSURLHandle -writeProperty:forKey:] to set the named property.
Calls
[NSURLHandle -writeData:]
to write the specified data object to the
resource identified by the receiver URL.
Returns the result.
Returns a URL with '/./' and '/../' sequences resolved etc.
Returns the user portion of the receiver or
nil
if there is no user supplied in the
URL.
Percent escape sequences in the user
string are translated and the whole is treated as
UTF8 data.
NB. because of its security
implications it is recommended that you do not
use URLs with users and passwords unless necessary.
- Declared in:
- Foundation/NSURL.h
Standards:
- MacOS-X
- NotOpenStep
- GNUstep
An informal protocol to which clients may conform if they wish to be notified of the progress in loading a URL for them. The default implementations of these methods do nothing.
Method summaryDescription forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.