Platforms to show: All Mac Windows Linux Cross-Platform

NSURLMBS.checkResourceIsReachableAndReturnError as NSErrorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Returns whether the URL's resource exists and is reachable.
Notes: This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns false, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation.

Feedback, Comments & Corrections

NSURLMBS.Constructor(item as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Creates an URL based on folderItem.

See also:

Feedback, Comments & Corrections

NSURLMBS.Constructor(scheme as string, host as string, path as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Initializes a newly created NSURL with a specified scheme, host, and path.
Notes:
scheme: The scheme for the NSURL object. For example, in the URL http://www.example.com/index.html, the scheme is http.
host: The host for the NSURL object (for example, www.example.com). May be the empty string.
path: The path for the NSURL object (for example, /index.html). If the path begins with a tilde, you must first expand it by calling stringByExpandingTildeInPath.

See also:

Feedback, Comments & Corrections

NSURLMBS.Constructor(url as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Creates and returns an NSURL object initialized with a provided URL string.

See also:

Feedback, Comments & Corrections

NSURLMBS.Constructor(url as string, baseURL as NSURLMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Creates and returns an NSURL object initialized with a base URL and a relative string.
Notes:
This method allows you to create a URL relative to a base path or URL. For example, if you have the URL for a folder on disk and the name of a file within that folder, you can construct a URL for the file by providing the folder’s URL as the base path (with a trailing slash) and the filename as the string part.

This method expects URLString to contain only characters that are allowed in a properly formed URL. All other characters must be properly percent escaped. Any percent-escaped characters are interpreted using UTF-8 encoding.

See also:

Feedback, Comments & Corrections

NSURLMBS.copy as NSURLMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Creates a copy of the URL object.

Feedback, Comments & Corrections

NSURLMBS.getResourceValue(byref value as Variant, key as string, byref error as NSErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Returns the value of the resource property for the specified key.
Notes:
value: The location where the value for the resource property identified by key should be stored.
key: The name of one of the URL’s resource properties.
error: The error that occurred if the resource value could not be retrieved.

Returns true if value is successfully populated; otherwise, false.

This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller.

The type of the returned resource value varies by resource property; for details, see the documentation for the key you want to access.

If this method returns true and the value is populated with nil, it means that the resource property is not available for the specified resource, and that no errors occurred when determining that the resource property was unavailable.

If this method returns false, an error occurred. The object pointer referenced by error is populated with additional information.

This method applies only to URLs that represent file system resources.

Available in OS X v10.6 and later.

Automatic type translation applies (See FAQ about NSDictionary).
e.g. NSNumber can be converted to Integer or Boolean depending on content.

Feedback, Comments & Corrections

NSURLMBS.isEqual(other as NSURLMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Tests if two NSURLs are equal.
Notes: Returns a Boolean value that indicates whether the receiver and a given object have identical URL strings and base URLs.

Feedback, Comments & Corrections

NSURLMBS.Items(byref error as NSErrorMBS, VisibleItemsOnly as boolean = false) as NSURLMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Queries list of items in the directory the URL points to on disk.
Notes: Error is optional.

See also:

Feedback, Comments & Corrections

NSURLMBS.Items(VisibleItemsOnly as boolean = false) as NSURLMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Queries list of items in the directory the URL points to on disk.

See also:

Feedback, Comments & Corrections

NSURLMBS.pathComponents as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: An array containing the path components. (read-only)
Notes: This property contains an array containing the individual path components of the URL. For example, in the URL file:///directory/directory2/file, the path components array would be "/", "directory", "directory2", "file".

Feedback, Comments & Corrections

NSURLMBS.removeAllCachedResourceValues
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Removes all cached resource values and temporary resource values from the URL object.
Notes:
This method is applicable only to URLs that represent file system resources.
Available in OS X v10.9 and later.

Feedback, Comments & Corrections

NSURLMBS.removeCachedResourceValueForKey(key as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Removes the cached resource value identified by a given key from the URL object.
Notes:
key: The resource value key whose cached values you want to remove.

Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values. (Temporary resource values have no dependencies.)

This method is currently applicable only to URLs for file system resources.

Available in OS X v10.9 and later.

Feedback, Comments & Corrections

NSURLMBS.resourceValuesForKeys(keys() as string, byref error as NSErrorMBS) as Dictionary
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Returns the resource values for the properties identified by specified array of keys.
Notes:
Returns a dictionary of resource values indexed by key.

This method first checks if the URL object already caches the specified resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller.

The type of the returned resource value varies by resource property; for details, see the documentation for the key you want to access.

If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the URL, and no errors occurred when determining those resource properties were not available.

If an error occurs, this method returns nil and populates the object pointer referenced by error with additional information.

This method applies only to URLs that represent file system resources.
Available in OS X v10.6 and later.

See also:

Feedback, Comments & Corrections

NSURLMBS.resourceValuesForKeys(keys() as string, targetDelegate as ResourceValuesForKeysDelegateMBS, tag as Variant = nil, PrecacheIcons as boolean = false)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Query keys asynchronously.
Notes:
The plugin will query values on a different preemptive thread and call your delegate on main thread with results as soon as possible. This way you can keep app responsive while system e.g. loads icons.
For icons, you can set PrecacheIcons to true. In that case plugin will draw icon on the preemptive thread, so icon data is really loaded from disk. When you than draw on main thread, it's really quick.

The delegate has this parameters:
ResourceValuesForKeysDelegateMBS(URL as NSURLMBS, keys() as String, Values as Dictionary, Error as NSErrorMBS, tag as Variant)

See also:

Feedback, Comments & Corrections

NSURLMBS.setResourceValue(value as Variant, key as string, byref error as NSErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Sets the URL’s resource property for a given key to a given value.
Notes:
value: The value for the resource property defined by key.
key: The name of one of the URL’s resource properties.
error: The error that occurred if the resource value could not be set.

Returns true if the resource property named key is successfully set to value; otherwise, false.

This method synchronously writes the new resource value out to disk. Attempts to set a read-only resource property or to set a resource property that is not supported by the resource are ignored and are not considered errors.

If an error occurs, this method returns NO and populates the object pointer referenced by error with additional information.

This method applies only to URLs for file system resources.
Available in OS X v10.6 and later.

Automatic type translation applies (See FAQ about NSDictionary).

Feedback, Comments & Corrections

NSURLMBS.setResourceValues(keyedValues as Dictionary, byref error as NSErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Sets the URL’s resource properties for a given set of keys to a given set of values.
Notes:
keyedValues: A dictionary of resource values to be set.
error: The error that occurred if one or more resource values could not be set.

Returns true if all resource values in keyedValues are successfully set; otherwise, false.

This method synchronously writes the new resource value out to disk. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error object contains a kCFURLKeysOfUnsetValuesKey key whose value is an array of the resource values that were not successfully set.

Attempts to set a read-only resource property or to set a resource property that is not supported by the resource are ignored and are not considered errors.

The order in which the resource values are set is not defined. If you need to guarantee the order in which resource values are set, you should make multiple requests to this method or setResourceValue:forKey:error:.

This method applies only to URLs for file system resources.
Available in OS X v10.6 and later.

Automatic type translation applies (See FAQ about NSDictionary).

Feedback, Comments & Corrections

NSURLMBS.setTemporaryResourceValue(value as Variant, key as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Sets a temporary resource value on the URL object.
Notes:
value: The value to store.
key: The key where the value should be stored. This key must be unique and must not conflict with any system-defined keys. Reverse-domain-name notation is recommended.

Your app can use a temporary resource value to temporarily store a value for an app-defined resource value key in memory without modifying the actual resource that the URL represents. Once set, you can copy the temporary resource value from the URL object just as you would copy system-defined keys—by calling getResourceValue or resourceValuesForKeys.

Your app can remove a temporary resource value from the URL object by calling removeCachedResourceValueForKey or removeAllCachedResourceValues (to remove all temporary values).

This method is applicable only to URLs for file system resources.
Available in OS X v10.9 and later.

Feedback, Comments & Corrections

NSURLMBS.startAccessingSecurityScopedResource as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Starts accessing a security scoped bookmark URL.
Notes: Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted).

Feedback, Comments & Corrections

NSURLMBS.stopAccessingSecurityScopedResource
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource.

Feedback, Comments & Corrections

NSURLMBS.TagNames as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: The names of tags attached to the resource, returned as an array of String values.
Notes: Available in OS X v10.9 and later.

Feedback, Comments & Corrections

NSURLMBS.URLByAppendingPathComponent(pathComponent as string) as NSURLMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Returns a new URL made by appending a path component to the original URL.
Notes:
pathComponent: The path component to add to the URL, in its original form (not URL encoded).

Returns a new URL with pathComponent appended.

If the original URL does not end with a forward slash and pathComponent does not begin with a forward slash, a forward slash is inserted between the two parts of the returned URL, unless the original URL is the empty string.

Available in OS X v10.6 and later.

See also:

Feedback, Comments & Corrections

NSURLMBS.URLByAppendingPathComponent(pathComponent as string, isDirectory as boolean) as NSURLMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Returns a new URL made by appending a path component to the original URL, along with a trailing slash if the component is designated a directory.
Notes:
pathComponent: The path component to add to the URL.
isDirectory: If true, a trailing slash is appended after pathComponent.

Returns a new URL with pathComponent appended.

If the original URL does not end with a forward slash and pathComponent does not begin with a forward slash, a forward slash is inserted between the two parts of the returned URL, unless the original URL is the empty string.

Available in OS X v10.7 and later.
On Mac OS X 10.6 the plugin falls back

See also:

Feedback, Comments & Corrections

NSURLMBS.URLByAppendingPathExtension(PathExtension as string) as NSURLMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: Returns a new URL made by appending a path extension to the original URL.
Notes:
pathExtension: The path extension to add to the URL.

Returns a new URL with pathExtension appended.

If the original URL ends with one or more forward slashes, these are removed from the returned URL. A period is inserted between the two parts of the new URL.
Available in OS X v10.6 and later.

Feedback, Comments & Corrections

NSURLMBS.URLByDeletingLastPathComponent as NSURLMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: A URL created by taking the receiver and removing the last path component.
Notes:
If the receiver’s URL represents the root path, this property contains a copy of the original URL. Otherwise, if the original URL has only one path component, this property contains the empty string.

Available in OS X v10.6 and later.

Feedback, Comments & Corrections

NSURLMBS.URLByDeletingPathExtension as NSURLMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: A URL created by taking the receiver and removing the path extension, if any.
Notes:
If the receiver represents the root path, this property contains a copy of the original URL. If the URL has multiple path extensions, only the last one is removed.

Available in OS X v10.6 and later.

Feedback, Comments & Corrections

NSURLMBS.URLByResolvingSymlinksInPath as NSURLMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: A URL that points to the same resource as the receiver and includes no symbolic links.
Notes:
If the receiver has no symbolic links, this property contains a copy of the original URL.

If some symbolic links cannot be resolved, this property contains those broken symbolic links.

If the name of the receiving path begins with /private, this property strips off the /private designator, provided the result is the name of an existing file.

This property only works on URLs with the file: path scheme. For all other URLs, it contains a copy of the receiver.
Available in OS X v10.6 and later.

Feedback, Comments & Corrections

NSURLMBS.URLByStandardizingPath as NSURLMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 15.2 Yes No No Yes, macOS only No
Function: A URL that points to the same resource as the original URL using an absolute path.
Notes:
This property only works on URLs with the file: path scheme. For all other URLs, it returns a copy of the original URL.

Like stringByStandardizingPath, this property can make the following changes in the provided URL:

  • Expand an initial tilde expression using stringByExpandingTildeInPath.
  • Reduce empty components and references to the current directory (that is, the sequences "//" and "/./") to single path separators.
  • In absolute paths only, resolve references to the parent directory (that is, the component "..") to the real parent directory if possible using stringByResolvingSymlinksInPath, which consults the file system to resolve each potential symbolic link.
  • In relative paths, because symbolic links can’t be resolved, references to the parent directory are left in place.
  • Remove an initial component of "/private" from the path if the result still indicates an existing file or directory (checked by consulting the file system).

Note that the path contained by this property may still have symbolic link components in it. Note also that this property only works with file paths (not, for example, string representations of URLs).

Available in OS X v10.6 and later.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacBase Plugin.

The biggest plugin in space...




Links
MBS Xojo Chart Plugins