|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.keel.apps.fileservices.DefaultFile
Provides a wrapper for the java.io.File object, to allow for usage by the File Models.
| Field Summary | |
static int |
BUFFER_SIZEThe Default buffer size for file transfers, in bytes Currently, the default is 1MB. |
protected java.io.File |
file |
| Constructor Summary | |
DefaultFile(java.io.File file) |
|
DefaultFile(java.lang.String fileName)Constructor for DefaultFile.java |
|
DefaultFile(java.lang.String dir, java.lang.String fileName)Constructor for DefaultFile.java |
|
| Method Summary | |
void |
copyTo(File dest)Copies a file from one File Object to another. |
void |
delete(boolean deleteChildren)Deletes the file associated with this File Object. |
java.lang.String |
getFileName()Gets the local file name of the current file object |
java.lang.String |
getFilePath()Get the full path of the current file object |
java.io.FileOutputStream |
getOutputStream()Get the writeable OutputStream for the underlying file object. |
void |
mkdir(boolean makeParents)Make the directory specified by the given path name |
void |
moveTo(File dest)Moves a file from one location to the specified destination |
void |
moveTo(java.lang.String dest)Moves a file from one location to the specified destination |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int BUFFER_SIZE
protected final java.io.File file
| Constructor Detail |
public DefaultFile(java.lang.String fileName)
public DefaultFile(java.lang.String dir,
java.lang.String fileName)
dir -fileName -public DefaultFile(java.io.File file)
| Method Detail |
public void copyTo(File dest)
throws java.io.IOException
copyTo in interface Filedest - The Destination to copy to.java.io.IOException - Thrown if an error occurs during copy operationFile.copyTo(org.keel.apps.fileservices.File)
public void moveTo(java.lang.String dest)
throws java.io.IOException
moveTo in interface Filedest - The filename to move this file tojava.io.IOException - Thrown if the file system errors out during the moveFile.moveTo(java.lang.String)
public void moveTo(File dest)
throws java.io.IOException
moveTo in interface Filedest - The destination to move this file to. Used especially for propietary and networked filesystems.java.io.IOException - Thrown if the file system errors out during the moveFile.moveTo(org.keel.apps.fileservices.File)
public void delete(boolean deleteChildren)
throws java.io.IOException
delete in interface Filejava.io.IOException - Thrown if the Delete fails for any reason.org.keel.apps.fileservices.File#delete()
public void mkdir(boolean makeParents)
throws java.io.IOException
mkdir in interface FilemakeParents - Make any required parent directories as welljava.io.IOException - Thrown if an error occurs during the creation of the specified directory, or any parent directories.File.mkdir(boolean)
public java.io.FileOutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface Filejava.io.IOException - Thrown if an error occurs opening OutputStreamorg.keel.apps.fileservices.File#getChannel()public java.lang.String getFileName()
getFileName in interface FileFile.getFileName()public java.lang.String getFilePath()
getFilePath in interface File
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||