com.threerings.jpkg
Class PathPermissions

java.lang.Object
  extended by com.threerings.jpkg.PathPermissions

public class PathPermissions
extends Object

Simple data class to contain permissions for paths used in a PermissionsMap.


Constructor Summary
PathPermissions(int mode, boolean recursive)
          Create a new permissions map which will be owned by the default user/group, e.g.
PathPermissions(int uid, int gid, int mode, boolean recursive)
          Create a new permissions map with the given uid and gid owner.
PathPermissions(String user, String group, int mode, boolean recursive)
          Create a new permissions map with the given user and group owner.
 
Method Summary
 int getGid()
          The group id to set as owner for this path.
 String getGroup()
          The groupname to set as owner for this path.
 int getMode()
          The file permission mode..
 int getUid()
          The user id to set as owner for this path.
 String getUser()
          The username to set as owner for this path.
 boolean isRecursive()
          Whether this permission map applies recursively down the path.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PathPermissions

public PathPermissions(int mode,
                       boolean recursive)
Create a new permissions map which will be owned by the default user/group, e.g. root but have the supplied file mode set.

Parameters:
mode - the file permission mode, in represented octal, e.g. 0644.
recursive - whether to apply this permission recursively down the path.

PathPermissions

public PathPermissions(String user,
                       String group,
                       int mode,
                       boolean recursive)
Create a new permissions map with the given user and group owner.

Parameters:
mode - the file permission mode, in represented octal, e.g. 0644.
recursive - whether to apply this permission recursively down the path.

PathPermissions

public PathPermissions(int uid,
                       int gid,
                       int mode,
                       boolean recursive)
Create a new permissions map with the given uid and gid owner.

Parameters:
mode - the file permission mode, represented in octal, e.g. 0644.
recursive - whether to apply this permission recursively down the path.
Method Detail

getUser

public String getUser()
The username to set as owner for this path.


getGroup

public String getGroup()
The groupname to set as owner for this path.


getUid

public int getUid()
The user id to set as owner for this path.


getGid

public int getGid()
The group id to set as owner for this path.


getMode

public int getMode()
The file permission mode..


isRecursive

public boolean isRecursive()
Whether this permission map applies recursively down the path.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2008 Three Rings Design, Inc. All Rights Reserved. Released under a BSD license.