public class WebdavFileAttributes extends java.lang.Object implements FileAttributes
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CONTENT_LENGTH |
private static java.lang.String |
CREATION_DATE_KEY |
private static java.lang.String |
MODIFIED_DATE_KEY |
protected org.apache.jackrabbit.webdav.property.DavPropertySet |
properties |
Constructor and Description |
---|
WebdavFileAttributes(org.apache.jackrabbit.webdav.property.DavPropertySet properties) |
Modifier and Type | Method and Description |
---|---|
private boolean |
areIdentical(WebdavFileAttributes a,
WebdavFileAttributes b) |
long |
creationTime()
Get the creation time for this file.
|
boolean |
equals(java.lang.Object obj) |
private java.lang.Object |
getProperty(java.lang.String name) |
java.lang.String |
group()
Get the group of this file.
|
int |
hashCode()
It was necessary to overwrite hashCode() because equals() is overridden also.
|
boolean |
isDirectory()
Does the path refer to a directory ?
|
boolean |
isExecutable()
Does the path refer to an executable file ?
|
boolean |
isHidden()
Does the path refer to an hidden file ?
|
boolean |
isOther()
Is the path not a file, link or directory ?
|
boolean |
isReadable()
Does the path refer to an readable file ?
|
boolean |
isRegularFile()
Does the path refer to a regular file ?
|
boolean |
isSymbolicLink()
Does the path refer to a symbolic link ?
|
boolean |
isWritable()
Does the path refer to a writable file ?
|
long |
lastAccessTime()
Get the last access time for this file.
|
long |
lastModifiedTime()
Get the last modified time for this file.
|
java.lang.String |
owner()
Get the owner of this file.
|
java.util.Set<PosixFilePermission> |
permissions()
Get the permissions of this file.
|
long |
size()
Get the size of this file.
|
private org.joda.time.DateTime |
tryGetLastModifiedTime() |
private static final java.lang.String CREATION_DATE_KEY
private static final java.lang.String MODIFIED_DATE_KEY
private static final java.lang.String CONTENT_LENGTH
protected org.apache.jackrabbit.webdav.property.DavPropertySet properties
public WebdavFileAttributes(org.apache.jackrabbit.webdav.property.DavPropertySet properties) throws XenonException
XenonException
private java.lang.Object getProperty(java.lang.String name)
public boolean isDirectory()
FileAttributes
isDirectory
in interface FileAttributes
public boolean isOther()
FileAttributes
isOther
in interface FileAttributes
public boolean isRegularFile()
FileAttributes
isRegularFile
in interface FileAttributes
public boolean isSymbolicLink()
FileAttributes
isSymbolicLink
in interface FileAttributes
public long creationTime()
FileAttributes
FileAttributes.lastModifiedTime()
will be returned instead.creationTime
in interface FileAttributes
public long lastAccessTime()
FileAttributes
FileAttributes.lastModifiedTime()
will be returned instead.lastAccessTime
in interface FileAttributes
public long lastModifiedTime()
FileAttributes
0
will be returned instead.lastModifiedTime
in interface FileAttributes
private org.joda.time.DateTime tryGetLastModifiedTime()
public long size()
FileAttributes
0
will be returned.size
in interface FileAttributes
public boolean isExecutable()
FileAttributes
isExecutable
in interface FileAttributes
public boolean isHidden()
FileAttributes
isHidden
in interface FileAttributes
public boolean isReadable()
FileAttributes
isReadable
in interface FileAttributes
public boolean isWritable()
FileAttributes
isWritable
in interface FileAttributes
public java.lang.String group() throws AttributeNotSupportedException
FileAttributes
group
in interface FileAttributes
AttributeNotSupportedException
- If the attribute is not supported by the adaptor.public java.lang.String owner() throws AttributeNotSupportedException
FileAttributes
owner
in interface FileAttributes
AttributeNotSupportedException
- If the attribute is not supported by the adaptor.public java.util.Set<PosixFilePermission> permissions() throws AttributeNotSupportedException
FileAttributes
permissions
in interface FileAttributes
AttributeNotSupportedException
- If the attribute is not supported by the adaptor.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
private boolean areIdentical(WebdavFileAttributes a, WebdavFileAttributes b)
public int hashCode()
hashCode
in class java.lang.Object