|
Secure FTP Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JFile
An abstract representation of file, directory or other type pathnames.
Method Summary | |
---|---|
void |
createNewDirectory()
Creates the directory named by this abstract pathname if and only if a file with this name does not yet exist. |
void |
createNewFile()
Creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist. |
void |
createNewLink(JFile target)
Creates the symbolic link named by this abstract pathname if and only if a file with this name does not yet exist. |
void |
delete()
Deletes the file or directory denoted by this abstract pathname. |
void |
deleteRecursive()
Recursively deletes the file or directory denoted by this abstract pathname. |
boolean |
exists()
Tests whether the file denoted by this abstract pathname exists. |
long |
getAccessTime()
Returns the file access time as seconds from Jan 1, 1970 in UTC. |
long |
getAccessTimeNsec()
Returns the additional file access time nano-seconds. |
JAcl[] |
getAcl()
Obtains the file ACL array similar to that defined in section 5.9 of NFS version 4 Protocol |
long |
getCreationTime()
Returns the file creation time as seconds from Jan 1, 1970 in UTC. |
long |
getCreationTimeNsec()
Returns the additional file creation time nano-seconds. |
java.lang.String |
getFilename()
Returns the name of the file or directory denoted by this abstract pathname. |
long |
getFilesize()
Returns the size of the file denoted by this abstract pathname. |
JFileSystem |
getFileSystem()
Returns the underlayed file system object. |
java.lang.String |
getGroup()
Returns the owner group name for this abstract pathname as string. |
JFile |
getLinkTarget()
Returns the link target if the current file is symbolic link. |
long |
getModificationTime()
Returns the file modification time as seconds from Jan 1, 1970 in UTC. |
long |
getModificationTimeNsec()
Returns the additional file modification time nano-seconds. |
java.lang.String |
getOwner()
Returns the owner name for this abstract pathname as string. |
JFile |
getParentFile()
Returns the abstract pathname of this abstract pathname's parent. |
java.lang.String |
getPath()
Converts this abstract pathname into a pathname string. |
JFilePermissions |
getPermissions()
Returns the POSIX file permissions for this abstract pathname. |
JRandomAccessFile |
getRandomAccessFile(com.jscape.inet.file.JFileOpenFlags openFlags,
JAcl.Mask accessType)
Provides access to the file contents returning a new JRandomAccessFile instance. |
JFileType |
getType()
Returns the POSIX file type represented by this abstract pathname. |
boolean |
isAppendOnly()
Tests whether the file named by this abstract pathname can only be opened for writing in append mode. |
boolean |
isArchive()
Tests whether the file named by this abstract pathname should be included in backup / archive operations. |
boolean |
isCaseInsensitive()
This attribute can only apply to directories. |
boolean |
isCompressed()
Tests whether the file named by this abstract pathname is compressed. |
boolean |
isDirectory()
Tests whether the file denoted by this abstract pathname is a directory. |
boolean |
isEncrypted()
Tests whether the file named by this abstract pathname is encrypted. |
boolean |
isHidden()
Tests whether the file named by this abstract pathname is a hidden file. |
boolean |
isImmutable()
Tests whether the file named by this abstract pathname cannot be deleted or renamed, no hard link can be created to this file and no data can be written to the file. |
boolean |
isReadOnly()
Tests whether the file named by this abstract pathname is not writable. |
boolean |
isSparse()
Tests whether the file named by this abstract pathname is sparse. |
boolean |
isSync()
Tests whether the file named by this abstract pathname when is modified, the changes are written synchronously to the disk. |
boolean |
isSystem()
Tests whether the file named by this abstract pathname is part of operating system. |
JFile[] |
listFiles()
Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname. |
JFile[] |
listFiles(com.jscape.inet.file.JFileFilter filter)
Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. |
void |
renameTo(JFile dest)
Renames the file denoted by this abstract pathname. |
void |
setAcl(JAcl[] acls)
Setups the file ACL's. |
void |
setArchive(boolean archive)
Setups archive attribute for this file. |
void |
setGroup(java.lang.String group)
Setups the new file owner group |
void |
setImmutable(boolean immutable)
Setups file immutability. |
void |
setOwner(java.lang.String owner)
Setups the new file owner. |
void |
setPermissions(JFilePermissions permissions)
Setups the new file permissions. |
void |
setSync(boolean sync)
Setups file changes synchronization mode. |
Method Detail |
---|
java.lang.String getFilename()
java.lang.String getPath()
JFile getParentFile()
JFileType getType() throws java.io.IOException
java.io.IOException
- if an I/O error occuredboolean isDirectory() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname exists and is a directory; false
otherwise
java.io.IOException
- if an I/O error occuredlong getFilesize() throws java.io.IOException
java.io.IOException
- if an I/O error occuredjava.lang.String getOwner() throws java.io.IOException
java.io.IOException
- if an I/O error occuredvoid setOwner(java.lang.String owner) throws java.io.IOException
owner
- the new file owner
java.io.IOException
- if an I/O error occuredjava.lang.String getGroup() throws java.io.IOException
java.io.IOException
- if an I/O error occuredvoid setGroup(java.lang.String group) throws java.io.IOException
group
- the new file owner group
java.io.IOException
- if an I/O error occuredJFilePermissions getPermissions() throws java.io.IOException
java.io.IOException
- if an I/O error occuredvoid setPermissions(JFilePermissions permissions) throws java.io.IOException
permissions
- the new file permissions
java.io.IOException
- if an I/O error occuredlong getAccessTime() throws java.io.IOException
java.io.IOException
- if an I/O error occuredlong getAccessTimeNsec() throws java.io.IOException
java.io.IOException
- if an I/O error occuredlong getCreationTime() throws java.io.IOException
java.io.IOException
- if an I/O error occuredlong getCreationTimeNsec() throws java.io.IOException
java.io.IOException
- if an I/O error occuredlong getModificationTime() throws java.io.IOException
java.io.IOException
- if an I/O error occuredlong getModificationTimeNsec() throws java.io.IOException
java.io.IOException
- if an I/O error occuredJAcl[] getAcl() throws java.io.IOException
java.io.IOException
- if an I/O error occuredvoid setAcl(JAcl[] acls) throws java.io.IOException
acls
- the new file ACL's
java.io.IOException
- if an I/O error occuredboolean isReadOnly() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname is not writable;
false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
boolean isSystem() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname is part of operation system;
false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
boolean isHidden() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname is hidden according to the conventions
of the underlying platform; false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
boolean isCaseInsensitive() throws java.io.IOException
true
if and only if files and directory names
in this directory should be compared without regard to case;
false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
boolean isArchive() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname should be included in backup / archive operations;
false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
void setArchive(boolean archive) throws java.io.IOException
archive
- if true
the file denoted by this
abstract pathname should be included in backup / archive operations
java.io.IOException
- if an I/O error occuredboolean isEncrypted() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname is encrypted; false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
boolean isCompressed() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname is compressed; false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
boolean isSparse() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname is sparse; false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
boolean isAppendOnly() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname can only be opened for writing in append mode;
false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
boolean isImmutable() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname is immutable; false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
void setImmutable(boolean immutable) throws java.io.IOException
immutable
- if true
the file becames immutable
java.io.IOException
- if an I/O error occuredboolean isSync() throws java.io.IOException
true
if and only if the file denoted by this
abstract pathname is sync; false otherwise
- Throws:
java.io.IOException
- if an I/O error occured
void setSync(boolean sync) throws java.io.IOException
sync
- if true
the changes to this file must be written
synchronously to the disk
java.io.IOException
- if an I/O error occuredboolean exists() throws java.io.IOException
true
if and only if the file denoted by
this abstract pathname exists; false
otherwise
java.io.IOException
- if an I/O error occuredvoid createNewFile() throws java.io.IOException
java.io.IOException
- if an I/O error occurredvoid createNewDirectory() throws java.io.IOException
java.io.IOException
- if an I/O error occurredvoid createNewLink(JFile target) throws java.io.IOException
target
- target file for the link
java.io.IOException
- if an I/O error occurredvoid renameTo(JFile dest) throws java.io.IOException
dest
- the new abstract pathname for the named file
java.io.IOException
- if an I/O error occurredvoid delete() throws java.io.IOException
java.io.IOException
- if an I/O error occurredvoid deleteRecursive() throws java.io.IOException
java.io.IOException
- if an I/O error occurredJFile[] listFiles() throws java.io.IOException
java.io.IOException
- if an I/O error occurredJFile[] listFiles(com.jscape.inet.file.JFileFilter filter) throws java.io.IOException
filter
- a file filter
java.io.IOException
- if an I/O error occurredJFile getLinkTarget() throws java.io.IOException
java.io.IOException
- if an I/O error occuredJRandomAccessFile getRandomAccessFile(com.jscape.inet.file.JFileOpenFlags openFlags, JAcl.Mask accessType) throws java.io.IOException
openFlags
- the file open flagsaccessType
- desired access type
java.io.IOException
- if an I/O error occurredJFileSystem getFileSystem()
|
Secure FTP Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |