Module posix1e :: Class Permset
[hide private]
[frames] | no frames]

Class Permset

object --+
         |
        Permset

Type which represents the permission set in an ACL entry

The type exists only if the OS has full support for POSIX.1e Can be retrieved either by:

>>> perms = myEntry.permset

or by:

>>> perms = posix1e.Permset(myEntry)

Note that the Permset keeps a reference to its Entry, so even if you delete the entry, it won't be cleaned up and will continue to exist until its Permset will be deleted.

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__str__(x)
str(x)
 
add(...)
Add a permission to the permission set.
 
clear(...)
Clear all permissions from the permission set.
 
delete(...)
Delete a permission from the permission set.
 
test(...)
Test if a permission exists in the permission set.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  execute
Execute permsission
  read
Read permsission
  write
Write permsission

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__str__(x)
(Informal representation operator)

 

str(x)

Overrides: object.__str__

add(...)

 

Add a permission to the permission set.

The add() function adds the permission contained in the argument perm to the permission set. An attempt to add a permission that is already contained in the permission set is not considered an error.

Parameters:

  • perm: a permission (ACL_WRITE, ACL_READ, ACL_EXECUTE, ...)

Return value: None

Can raise: IOError

delete(...)

 

Delete a permission from the permission set.

The delete() function deletes the permission contained in the argument perm from the permission set. An attempt to delete a permission that is not contained in the permission set is not considered an error. Parameters:

  • perm a permission (ACL_WRITE, ACL_READ, ACL_EXECUTE, ...)

Return value: None

Can raise: IOError

test(...)

 

Test if a permission exists in the permission set.

The test() function tests if the permission contained in the argument perm exits the permission set. Parameters:

  • perm a permission (ACL_WRITE, ACL_READ, ACL_EXECUTE, ...)

Return value: Boolean

Can raise: IOError


Property Details [hide private]

execute

Execute permsission

This is a convenience method of access; the same effect can be achieved using the functions add(), test(), delete(), and those can take any permission defined by your platform.

read

Read permsission

This is a convenience method of access; the same effect can be achieved using the functions add(), test(), delete(), and those can take any permission defined by your platform.

write

Write permsission

This is a convenience method of access; the same effect can be achieved using the functions add(), test(), delete(), and those can take any permission defined by your platform.