|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.cap.entityattrs.ntfs.util.ECNtfsAttributesUtil
public final class ECNtfsAttributesUtil
This class contains static utility methods for working with the
ECNtfsAttributes
capability.
Method Summary | |
---|---|
static NtfsAttributes |
getAttributes(EntityView ev)
Get NTFS attributes for an entity. |
static ECNtfsAttributes |
getCapability(EntityView ev)
Get the ECNtfsAttributes capability for an entity. |
static long |
getCreationTime(EntityView ev)
Get the creation time attribute. |
static Set<NtFileAttributes> |
getNtFileAttributes(EntityView ev)
Get the NT file attributes for the entity. |
static UidGid |
getUidGid(EntityView ev)
Get the user and group id attributes for the entity. |
static UnixEntityMode |
getUnixEntityMode(EntityView ev)
Get the Unix entity permission mode for the entity. |
static void |
setAttributes(EntityView ev,
NtfsAttributes attr)
Set the NTFS attributes for an entity. |
static void |
setCreationTime(EntityView ev,
long creationTime)
Set the creation time attribute. |
static void |
setGid(EntityView ev,
int gid)
Set the group id attribute for the entity. |
static void |
setNtFileAttributes(EntityView ev,
int fattr)
Set the NT file attributes for an entity. |
static void |
setNtFileAttributes(EntityView ev,
Set<NtFileAttributes> s)
Set the NT file attributes for an entity. |
static void |
setUid(EntityView ev,
int uid)
Set the user id attribute for the entity. |
static void |
setUidGid(EntityView ev,
UidGid ug)
Set the user and group id attributes for the entity. |
static void |
setUnixEntityMode(EntityView ev,
int mode)
Set the Unix entity permission mode for the entity. |
static void |
setUnixEntityMode(EntityView ev,
UnixEntityMode m)
Set the Unix entity permission mode for the entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ECNtfsAttributes getCapability(EntityView ev) throws UnsupportedCapabilityException
ECNtfsAttributes
capability for an entity.
Some implementations do not support entity attributes for all entities in a file system. Often, the root directory is not supported.
ev
- The entity.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.public static NtfsAttributes getAttributes(EntityView ev) throws UnsupportedCapabilityException, AccessDeniedException
This method temporarily acquires a read lock on the entity's parent directory.
ev
- The entity to get the attributes for.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have read access to
the entity's parent directory.public static void setAttributes(EntityView ev, NtfsAttributes attr) throws UnsupportedCapabilityException, AccessDeniedException, ReadOnlyException
This method temporarily acquires a write lock on the entity's parent directory.
ev
- The entity to set the attributes for.attr
- The attributes.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have write access to
the entity's parent directory.
ReadOnlyException
- If the file system is read only.public static long getCreationTime(EntityView ev) throws UnsupportedCapabilityException, AccessDeniedException
The entity's parent directory is temporarily locked for reading by this method.
ev
- The entity to get the creation time for.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have read access to
the entity's parent directory.setCreationTime(EntityView, long)
public static void setCreationTime(EntityView ev, long creationTime) throws UnsupportedCapabilityException, AccessDeniedException, ReadOnlyException
The entity's parent directory is temporarily locked for writing by this method.
ev
- The entity to set the creation time for.creationTime
- The new value of the creation time attribute.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have write access to
the entity's parent directory.
ReadOnlyException
- If the file system is read only.getCreationTime(EntityView)
public static Set<NtFileAttributes> getNtFileAttributes(EntityView ev) throws UnsupportedCapabilityException, AccessDeniedException
The entity's parent directory is temporarily locked for reading by this method.
ev
- The entity to get the NT file attributes for.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have read access to
the entity's parent directory.setNtFileAttributes(EntityView, int)
,
setNtFileAttributes(EntityView, Set)
public static void setNtFileAttributes(EntityView ev, Set<NtFileAttributes> s) throws UnsupportedCapabilityException, AccessDeniedException, ReadOnlyException
The entity's parent directory is temporarily locked for writing by this method.
ev
- The entity to set the NT file attributes for.s
- The attributes.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have write access to
the entity's parent directory.
ReadOnlyException
- If the file system is read only.getNtFileAttributes(EntityView)
,
setNtFileAttributes(EntityView, int)
public static void setNtFileAttributes(EntityView ev, int fattr) throws UnsupportedCapabilityException, AccessDeniedException, ReadOnlyException
The entity's parent directory is temporarily locked for writing by this method.
ev
- The entity to set the NT file attributes for.fattr
- The attributes, represented by an integer. See
NtFileAttributes
.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have write access to
the entity's parent directory.
ReadOnlyException
- If the file system is read only.getNtFileAttributes(EntityView)
,
setNtFileAttributes(EntityView, Set)
public static UnixEntityMode getUnixEntityMode(EntityView ev) throws UnsupportedCapabilityException, AccessDeniedException
The entity's parent directory is temporarily locked for reading by this method.
ev
- The entity to get the Unix entity permission mode for.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have read access to
the entity's parent directory.setUnixEntityMode(EntityView, int)
,
setUnixEntityMode(EntityView, UnixEntityMode)
public static void setUnixEntityMode(EntityView ev, UnixEntityMode m) throws UnsupportedCapabilityException, AccessDeniedException, ReadOnlyException
The entity's parent directory is temporarily locked for writing by this method.
ev
- The entity to set the Unix entity permission mode for.m
- The new Unix entity permission mode.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have write access to
the entity's parent directory.
ReadOnlyException
- If the file system is read only.getUnixEntityMode(EntityView)
,
setUnixEntityMode(EntityView, int)
public static void setUnixEntityMode(EntityView ev, int mode) throws UnsupportedCapabilityException, AccessDeniedException, ReadOnlyException
The entity's parent directory is temporarily locked for writing by this method.
ev
- The entity to set the Unix entity permission mode for.mode
- Integer representation of the new Unix entity permission
mode. See UnixEntityMode
.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have write access to
the entity's parent directory.
ReadOnlyException
- If the file system is read only.getUnixEntityMode(EntityView)
,
setUnixEntityMode(EntityView, UnixEntityMode)
public static UidGid getUidGid(EntityView ev) throws UnsupportedCapabilityException, AccessDeniedException
The entity's parent directory is temporarily locked for reading by this method.
ev
- The entity to get the UID and GID for.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have read access to
the entity's parent directory.setUidGid(EntityView, UidGid)
,
setUid(EntityView, int)
,
setGid(EntityView, int)
public static void setUidGid(EntityView ev, UidGid ug) throws UnsupportedCapabilityException, AccessDeniedException, ReadOnlyException
The entity's parent directory is temporarily locked for writing by this method.
ev
- The entity to set the UID and GID attributes for.ug
- The new UID and GID values. The UidGid
:s primary GID is
used for the GID value.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have write access to
the entity's parent directory.
ReadOnlyException
- If the file system is read only.getUidGid(EntityView)
,
setUid(EntityView, int)
,
setGid(EntityView, int)
public static void setUid(EntityView ev, int uid) throws UnsupportedCapabilityException, AccessDeniedException, ReadOnlyException
The entity's parent directory is temporarily locked for writing by this method.
ev
- The entity to set the UID attribute for.uid
- The new UID.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have write access to
the entity's parent directory.
ReadOnlyException
- If the file system is read only.getUidGid(EntityView)
,
setUidGid(EntityView, UidGid)
,
setGid(EntityView, int)
public static void setGid(EntityView ev, int gid) throws UnsupportedCapabilityException, AccessDeniedException, ReadOnlyException
The entity's parent directory is temporarily locked for writing by this method.
ev
- The entity to set the GID attribute for.gid
- The new GID.
UnsupportedCapabilityException
- If the entity does not support the
ECNtfsAttributes
capability.
AccessDeniedException
- If the client does not have write access to
the entity's parent directory.
ReadOnlyException
- If the file system is read only.getUidGid(EntityView)
,
setUidGid(EntityView, UidGid)
,
setUid(EntityView, int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |