public class FtpFileAttributes extends java.lang.Object implements FileAttributes
Modifier and Type | Field and Description |
---|---|
private org.apache.commons.net.ftp.FTPFile |
attributes |
private static int[] |
permissionTypes |
private static int[] |
userTypes |
Constructor and Description |
---|
FtpFileAttributes(org.apache.commons.net.ftp.FTPFile ftpFile) |
Modifier and Type | Method and Description |
---|---|
private boolean |
areFtpFilesIdentical(org.apache.commons.net.ftp.FTPFile a,
org.apache.commons.net.ftp.FTPFile b) |
long |
creationTime()
Get the creation time for this file.
|
boolean |
equals(java.lang.Object obj) |
private java.util.HashSet<PosixFilePermission> |
getPermissions() |
private static PosixFilePermission |
getPosixFilePermission(int userType,
int permissionType) |
java.lang.String |
group()
Get the group of this file.
|
int |
hashCode()
It was necessary to overwrite hashCode() because equals() is overridden also.
|
private boolean |
haveDifferentGroups(org.apache.commons.net.ftp.FTPFile a,
org.apache.commons.net.ftp.FTPFile b) |
private boolean |
haveDifferentTimestamps(org.apache.commons.net.ftp.FTPFile a,
org.apache.commons.net.ftp.FTPFile b) |
private boolean |
haveDifferentUsers(org.apache.commons.net.ftp.FTPFile a,
org.apache.commons.net.ftp.FTPFile b) |
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 static final int[] permissionTypes
private static final int[] userTypes
private org.apache.commons.net.ftp.FTPFile attributes
public FtpFileAttributes(org.apache.commons.net.ftp.FTPFile ftpFile) throws XenonException
XenonException
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
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.private java.util.HashSet<PosixFilePermission> getPermissions()
private static PosixFilePermission getPosixFilePermission(int userType, int permissionType)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
private boolean areFtpFilesIdentical(org.apache.commons.net.ftp.FTPFile a, org.apache.commons.net.ftp.FTPFile b)
private boolean haveDifferentTimestamps(org.apache.commons.net.ftp.FTPFile a, org.apache.commons.net.ftp.FTPFile b)
private boolean haveDifferentGroups(org.apache.commons.net.ftp.FTPFile a, org.apache.commons.net.ftp.FTPFile b)
private boolean haveDifferentUsers(org.apache.commons.net.ftp.FTPFile a, org.apache.commons.net.ftp.FTPFile b)