Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

CFURLMBS.ResourcePropertyForKey(key as CFStringMBS, byref value as Variant, byref error as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin 17.1 Yes No No Yes, macOS only No
Function: Returns the resource value identified by a given resource key.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test")
dim c as CFURLMBS = NewCFURLMBSFile(f)

dim v as Variant
dim e as CFErrorMBS

if c.ResourcePropertyForKey(c.kCFURLIsPackageKey, v1, e) then
dim p as CFBooleanMBS = v

MsgBox "IsPackage: "+str(p.Value)
else
MsgBox "Error: "+e.Description
end if
Notes:
key: The resource key that identifies the resource property.
Value: On output when the result is true, the resource value or nil.
error: On output when the result is false, the error that occurred.

Returns true if value is successfully populated; false if an error occurs.

ResourcePropertyForKey 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 ResourcePropertyForKey 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 resource value varies by resource property (see resource key definitions). If this function returns true and v alue is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this function returns false, the optional error is populated. This function is currently applicable only to URLs for file system resources.

Feedback, Comments & Corrections

CFURLMBS.ResourceSpecifier as CFStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Returns the ResourceSpecifier part of this URL.

Feedback, Comments & Corrections

CFURLMBS.Scheme as CFStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Returns the scheme part of this URL.

Feedback, Comments & Corrections

CFURLMBS.SetResourcePropertyForKey(key as CFStringMBS, value as Variant, byref error as CFErrorMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin 17.1 Yes No No Yes, macOS only No
Function: Sets the resource value identified by a given resource key.
Example:
Dim f As FolderItem = SpecialFolder.Desktop.Child("test")
Dim c As CFURLMBS = NewCFURLMBSFile(f)

Dim e As CFErrorMBS

If c.SetResourcePropertyForKey(c.kCFURLIsPackageKey, NewCFBooleanMBS(true), e) Then
MsgBox "OK"
Else
MsgBox "Error: "+e.Description
End If
Notes:
key: The resource key that identifies the resource property.
Value: The resource value.
error: On output when the result is false, the error that occurred.

Returns true if the attempt to set the resource value completed with no errors; otherwise, false.

CFURLSetResourcePropertyForKey writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this function returns false, the optional error is populated. This function is currently applicable only to URLs for file system resources.

Feedback, Comments & Corrections

CFURLMBS.Str as CFStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Returns the URL as binary data.

Feedback, Comments & Corrections

CFURLMBS.StrictPath as CFStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Returns the StrictPath part of this URL.

Feedback, Comments & Corrections

CFURLMBS.UserName as CFStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Returns the UserName part of this URL.

Feedback, Comments & Corrections

CFURLMBS.WindowsFileSystemPath as CFStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CoreFoundation MBS MacCF Plugin Yes No No Yes, macOS only No
Function: Returns the URL as WindowsFileSystemPath.

Feedback, Comments & Corrections

Previous items

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




Links
MBS FileMaker tutorial videos