Skip to content

rylio/OTMXAttribute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTMXAttribute

The xattr command can be used to display, modify or remove the extended attributes of one or more files, including directories and symbolic links. Extended attributes are arbitrary metadata stored with a file, but separate from the filesystem attributes (such as modification time or file size). The metadata is often a null-terminated UTF-8 string, but can also be arbitrary binary data.

Examples

Set

BOOL success = [OTMXAttribute setAttributeAtPath:filePath name:myKey value:stringOrDataValue error:NULL];

Get

NSData *attribute = [OTMXAttribute attributeAtPath:filePath name:myKey error:NULL];
NSString *attributeAsString = [OTMXAttribute stringAttributeAtPath:filePath name:myKey error:NULL];

###Remove

BOOL success = [OTMXAttribute removeAttributeAtPath:filePath name:myKey error:NULL];

License

OTMXAttribute is released under the MIT License. See LICENSE for more info.

About

Objective-C wrapper around xattr.

Resources

License

Stars

Watchers

Forks

Packages

No packages published