xattr (version 0.6.4)
index
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/xattr/__init__.py

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 xattr type wraps a path or file descriptor with a dict-like interface
that exposes these extended attributes.

 
Package Contents
       
_xattr
constants
tool

 
Classes
       
__builtin__.object
xattr

 
class xattr(__builtin__.object)
    A wrapper for paths or file descriptors to access
their extended attributes with a dict-like interface
 
  Methods defined here:
__contains__ = has_key(self, item)
__delitem__(self, item)
__getitem__(self, item)
__init__(self, obj, options=0)
obj should be a path, a file descriptor, or an
object that implements fileno() and returns a file
descriptor.
 
options should be 0 or XATTR_NOFOLLOW.  If set, it will
be OR'ed with the options passed to getxattr, setxattr, etc.
__iter__ = iterkeys(self)
__len__(self)
__repr__(self)
__setitem__(self, item, value)
clear(self)
copy(self)
get(self, name, options=0)
Retrieve the extended attribute ``name`` as a ``str``.
Raises ``IOError`` on failure.
 
See x-man-page://2/getxattr for options and possible errors.
has_key(self, item)
items(self)
iteritems(self)
iterkeys(self)
itervalues(self)
keys(self)
list(self, options=0)
Retrieves the extended attributes currently set as a list
of unicode strings.  Raises ``IOError`` on failure.
 
See x-man-page://2/listxattr for options and possible errors.
remove(self, name, options=0)
Remove the extended attribute ``name``
Raises ``IOError`` on failure.
 
See x-man-page://2/removexattr for options and possible errors.
set(self, name, value, options=0)
Set the extended attribute ``name`` to ``value``
Raises ``IOError`` on failure.
 
See x-man-page://2/setxattr for options and possible errors.
setdefault(self, k, d='')
update(self, seq)
values(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
getxattr(f, attr, symlink=False)
listxattr(f, symlink=False)
removexattr(f, attr, symlink=False)
setxattr(f, attr, value, options=0, symlink=False)

 
Data
        XATTR_CREATE = 2
XATTR_FINDERINFO_NAME = 'com.apple.FinderInfo'
XATTR_MAXNAMELEN = 127
XATTR_NOFOLLOW = 1
XATTR_NOSECURITY = 8
XATTR_REPLACE = 4
XATTR_RESOURCEFORK_NAME = 'com.apple.ResourceFork'
__version__ = '0.6.4'