Platforms to show: All Mac Windows Linux Cross-Platform
Back to ExtendedAttributesMBS module.
ExtendedAttributesMBS.Available as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
ExtendedAttributesMBS.GetAttribute(path as folderitem, name as string, options as Integer = 0) as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
On Mac the extended attributes are normally formatted property lists, so please use the high level functions SetAttribute/GetAttribute. Raw functions are better for things like resourcefork or FinderInfo.
Extended attributes extend the basic attributes of files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
The GetAttribute function retrieves all bytes of data from the extended attribute identified by name associated with path.
An extended attribute's name is a simple UTF-8 string. position specifies an offset within the extended attribute. In the current implementation, this argument is only used with the resource fork attribute. For all other extended attributes, this parameter is reserved and should be zero.
On success, returns the data associated with name.
Options specify options for retrieving extended attributes:
kNoFollow | Do not follow symbolic links. getxattr() normally returns information from the target of path if it is a symbolic link. With this option, GetAttribute will return extended attribute data from the symbolic link instead. |
On success, the value is returned. On failure, nil is returned and lasterror is set.
See also:
ExtendedAttributesMBS.GetAttribute(path as string, name as string, options as Integer = 0) as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
On Mac the extended attributes are normally formatted property lists, so please use the high level functions SetAttribute/GetAttribute. Raw functions are better for things like resourcefork or FinderInfo.
Extended attributes extend the basic attributes of files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
The GetAttribute function retrieves all bytes of data from the extended attribute identified by name associated with path.
An extended attribute's name is a simple UTF-8 string. position specifies an offset within the extended attribute. In the current implementation, this argument is only used with the resource fork attribute. For all other extended attributes, this parameter is reserved and should be zero.
On success, returns the data associated with name.
Options specify options for retrieving extended attributes:
kNoFollow | Do not follow symbolic links. getxattr() normally returns information from the target of path if it is a symbolic link. With this option, GetAttribute will return extended attribute data from the symbolic link instead. |
On success, the value is returned. On failure, nil is returned and lasterror is set.
See also:
ExtendedAttributesMBS.GetRawAttribute(path as folderitem, name as string, options as Integer = 0) as memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
On Mac the extended attributes are normally formatted property lists, so please use the high level functions SetAttribute/GetAttribute. Raw functions are better for things like resourcefork or FinderInfo.
Extended attributes extend the basic attributes of files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
The GetRawAttribute function retrieves all bytes of data from the extended attribute identified by name associated with path.
An extended attribute's name is a simple UTF-8 string. position specifies an offset within the extended attribute. In the current implementation, this argument is only used with the resource fork attribute. For all other extended attributes, this parameter is reserved and should be zero.
On success, returns the data associated with name.
Options specify options for retrieving extended attributes:
kNoFollow | Do not follow symbolic links. getxattr() normally returns information from the target of path if it is a symbolic link. With this option, GetRawAttribute will return extended attribute data from the symbolic link instead. |
On success, the value is returned. On failure, nil is returned and lasterror is set.
See also:
ExtendedAttributesMBS.GetRawAttribute(path as string, name as string, options as Integer = 0) as memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
On Mac the extended attributes are normally formatted property lists, so please use the high level functions SetAttribute/GetAttribute. Raw functions are better for things like resourcefork or FinderInfo.
Extended attributes extend the basic attributes of files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
The GetRawAttribute function retrieves all bytes of data from the extended attribute identified by name associated with path.
An extended attribute's name is a simple UTF-8 string. position specifies an offset within the extended attribute. In the current implementation, this argument is only used with the resource fork attribute. For all other extended attributes, this parameter is reserved and should be zero.
On success, returns the data associated with name.
Options specify options for retrieving extended attributes:
kNoFollow | Do not follow symbolic links. getxattr() normally returns information from the target of path if it is a symbolic link. With this option, GetRawAttribute will return extended attribute data from the symbolic link instead. |
On success, the value is returned. On failure, nil is returned and lasterror is set.
See also:
ExtendedAttributesMBS.LastError as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
Possible error values:
EPERM | 1 | Attributes cannot be associated with this type of object. For example, attributes are not allowed for resource forks. |
EIO | 5 | An I/O error occurred while reading from or writing to the file system. |
E2BIG | 7 | The data size of the extended attribute is too large. |
EACCES | 13 | Permissions denied |
EFAULT | 14 | path or name points to an invalid address. |
EEXIST | 17 | options contains XATTR_CREATE and the named attribute already exists. |
ENOTDIR | 20 | A component of path's prefix is not a directory. |
EISDIR | 21 | path or fd do not refer to a regular file and the attribute in question is only applicable to files. Similar to EPERM. |
EINVAL | 22 | name or options is invalid. name must be valid UTF-8 and options must make sense. |
ENOSPC | 28 | Not enough space left on the file system. |
EROFS | 30 | The file system is mounted read-only. |
ERANGE | 34 | The data size of the attribute is out of range (some attributes have size restrictions). |
ENOTSUP | 45 | The file system does not support extended attributes or has the feature disabled. |
ELOOP | 62 | Too many symbolic links were encountered resolving path. |
ENAMETOOLONG | 63 | Name exceeded XATTR_MAXNAMELEN UTF-8 bytes, or a component of path exceeded NAME_MAX characters, or the entire path exceeded PATH_MAX characters. |
ENOATTR | 93 | options is set to kReplace and the named attribute does not exist. |
ExtendedAttributesMBS.LastErrorMessage as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 13.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
ExtendedAttributesMBS.ListAttributes(path as folderitem, Options as Integer = 0) as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
ListAttributes retrieves a list of names of extended attributes associated with the given path in the file system. The list will only include names of extended attributes to which the calling process has access.
Options controls how the attribute list is generated:
kNoFollow: Do not follow symbolic links. ListAttributes normally lists attributes of the target of path if it is a symbolic link. With this option, ListAttributes will list attributes of the link itself.
kShowCompression: ListAttributes will list HFS Plus Compression extended attribute(s) (if present) for the file referred to by path.
On success returns array with names. If no accessible extended attributes are associated with the given path, the function returns empty array. Lasterror is set.
See also:
ExtendedAttributesMBS.ListAttributes(path as string, Options as Integer = 0) as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
ListAttributes retrieves a list of names of extended attributes associated with the given path in the file system. The list will only include names of extended attributes to which the calling process has access.
Options controls how the attribute list is generated:
kNoFollow: Do not follow symbolic links. ListAttributes normally lists attributes of the target of path if it is a symbolic link. With this option, ListAttributes will list attributes of the link itself.
kShowCompression: ListAttributes will list HFS Plus Compression extended attribute(s) (if present) for the file referred to by path.
On success returns array with names. If no accessible extended attributes are associated with the given path, the function returns empty array. Lasterror is set.
See also:
ExtendedAttributesMBS.RemoveAttribute(path as folderitem, name as string, options as Integer = 0) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
RemoveAttribute deletes the extended attribute name associated with path.
An extended attribute's name is a simple UTF-8 string. Options is a bit mask specifying various options:
kNoFollow | Do not follow symbolic links. Normally, removexattr() acts on the target of path if it is a symbolic link. With this option, RemoveAttribute will act on the link itself. |
On success, true is returned. On failure, false is returned and the lasterror value is set.
See also:
ExtendedAttributesMBS.RemoveAttribute(path as string, name as string, options as Integer = 0) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
RemoveAttribute deletes the extended attribute name associated with path.
An extended attribute's name is a simple UTF-8 string. Options is a bit mask specifying various options:
kNoFollow | Do not follow symbolic links. Normally, removexattr() acts on the target of path if it is a symbolic link. With this option, RemoveAttribute will act on the link itself. |
On success, true is returned. On failure, false is returned and the lasterror value is set.
See also:
ExtendedAttributesMBS.SetAttribute(path as folderitem, name as string, data as Variant, options as Integer = 0) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
On Mac the extended attributes are normally formatted property lists, so please use the high level functions SetAttribute/GetAttribute. Raw functions are better for things like resourcefork or FinderInfo.
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
SetAttribute associates name and data together as an attribute of path.
An extended attribute's name is a simple UTF-8 string. Data is a memoryblock with the data and contains textual or binary data to be associated with the extended attribute. Position specifies the offset within the extended attribute. In the current implementation, only the resource fork extended attribute makes use of this argument. For all others, position is reserved and should be set to zero.
Options controls how the attribute is set:
kNoFollow | Do not follow symbolic links. SetAttribute normally sets attributes on the target of path if it is a symbolic link. With this option, SetAttribute will act on the link itself. |
kCreate | Fail if the named attribute already exists. |
kReplace | Fail if the named attribute does not exist. Failure to specify kReplace or kCreate allows creation and replacement. |
On some filesystems, such as HFS+, setting the extended attribute com.apple.ResourceFork will update the modification time of the file.
Returns true on success and false on failure. Lasterror is set.
You may need to inform other applications like Finder that file changed and attributes need to be read.
See also:
ExtendedAttributesMBS.SetAttribute(path as string, name as string, data as Variant, options as Integer = 0) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
On Mac the extended attributes are normally formatted property lists, so please use the high level functions SetAttribute/GetAttribute. Raw functions are better for things like resourcefork or FinderInfo.
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
SetAttribute associates name and data together as an attribute of path.
An extended attribute's name is a simple UTF-8 string. Data is a memoryblock with the data and contains textual or binary data to be associated with the extended attribute. Position specifies the offset within the extended attribute. In the current implementation, only the resource fork extended attribute makes use of this argument. For all others, position is reserved and should be set to zero.
Options controls how the attribute is set:
kNoFollow | Do not follow symbolic links. SetAttribute normally sets attributes on the target of path if it is a symbolic link. With this option, SetAttribute will act on the link itself. |
kCreate | Fail if the named attribute already exists. |
kReplace | Fail if the named attribute does not exist. Failure to specify kReplace or kCreate allows creation and replacement. |
On some filesystems, such as HFS+, setting the extended attribute com.apple.ResourceFork will update the modification time of the file.
Returns true on success and false on failure. Lasterror is set.
You may need to inform other applications like Finder that file changed and attributes need to be read.
See also:
ExtendedAttributesMBS.SetRawAttribute(path as folderitem, name as string, data as memoryblock, options as Integer = 0) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
On Mac the extended attributes are normally formatted property lists, so please use the high level functions SetAttribute/GetAttribute. Raw functions are better for things like resourcefork or FinderInfo.
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
SetRawAttribute associates name and data together as an attribute of path.
An extended attribute's name is a simple UTF-8 string. Data is a memoryblock with the data and contains textual or binary data to be associated with the extended attribute. Position specifies the offset within the extended attribute. In the current implementation, only the resource fork extended attribute makes use of this argument. For all others, position is reserved and should be set to zero.
Options controls how the attribute is set:
kNoFollow | Do not follow symbolic links. SetRawAttribute normally sets attributes on the target of path if it is a symbolic link. With this option, SetRawAttribute will act on the link itself. |
kCreate | Fail if the named attribute already exists. |
kReplace | Fail if the named attribute does not exist. Failure to specify kReplace or kCreate allows creation and replacement. |
On some filesystems, such as HFS+, setting the extended attribute com.apple.ResourceFork will update the modification time of the file.
Returns true on success and false on failure. Lasterror is set.
You may need to inform other applications like Finder that file changed and attributes need to be read.
See also:
ExtendedAttributesMBS.SetRawAttribute(path as string, name as string, data as memoryblock, options as Integer = 0) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacOSX Plugin | 12.5 | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes | All |
On Mac the extended attributes are normally formatted property lists, so please use the high level functions SetAttribute/GetAttribute. Raw functions are better for things like resourcefork or FinderInfo.
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
SetRawAttribute associates name and data together as an attribute of path.
An extended attribute's name is a simple UTF-8 string. Data is a memoryblock with the data and contains textual or binary data to be associated with the extended attribute. Position specifies the offset within the extended attribute. In the current implementation, only the resource fork extended attribute makes use of this argument. For all others, position is reserved and should be set to zero.
Options controls how the attribute is set:
kNoFollow | Do not follow symbolic links. SetRawAttribute normally sets attributes on the target of path if it is a symbolic link. With this option, SetRawAttribute will act on the link itself. |
kCreate | Fail if the named attribute already exists. |
kReplace | Fail if the named attribute does not exist. Failure to specify kReplace or kCreate allows creation and replacement. |
On some filesystems, such as HFS+, setting the extended attribute com.apple.ResourceFork will update the modification time of the file.
Returns true on success and false on failure. Lasterror is set.
You may need to inform other applications like Finder that file changed and attributes need to be read.
See also:
The items on this page are in the following plugins: MBS MacOSX Plugin.