|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jasp.io.File
Contains methods and properties that allow you to create, delete, or move a file. Also allows you to query the system for a file name, path, and various other properties
Constructor Summary | |
File(java.lang.String filename)
|
Method Summary | |
void |
Copy(java.lang.String destination)
Copies a specified file or folder from one location to another. |
void |
Copy(java.lang.String destination,
boolean overwrite)
Copies a specified file or folder from one location to another. |
void |
Delete()
Deletes a specified file |
void |
Delete(boolean force)
Deletes a specified file |
boolean |
exists()
|
int |
getAttributes()
|
vbdate |
getDateCreated()
|
vbdate |
getDateLastAccessed()
|
vbdate |
getDateLastModified()
|
java.lang.String |
getDrive()
|
java.lang.String |
getName()
Sets or returns the name of a specified file or folder. |
java.lang.String |
getParentFolder()
|
java.lang.String |
getPath()
|
java.lang.String |
getShortName()
|
java.lang.String |
getShortPath()
|
int |
getSize()
|
java.lang.String |
getType()
Returns information about the type of a file or folder. |
void |
Move(java.lang.String destination)
Moves a specified file or folder from one location to another. |
TextStream |
OpenAsTextStream()
Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file. |
TextStream |
OpenAsTextStream(int iomode)
Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file. |
TextStream |
OpenAsTextStream(int iomode,
int format)
Opens a specified file and returns a TextStream object that can be used to read from, write to, or append to the file. |
void |
setAttributes(int attr)
|
void |
setName(java.lang.String name1)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public File(java.lang.String filename)
Method Detail |
public void setAttributes(int attr)
public int getAttributes()
public vbdate getDateCreated()
public vbdate getDateLastAccessed()
public vbdate getDateLastModified()
public java.lang.String getDrive() throws java.lang.Exception
public java.lang.String getName()
public void setName(java.lang.String name1)
public java.lang.String getParentFolder() throws java.lang.Exception
public java.lang.String getPath()
public java.lang.String getShortName()
public java.lang.String getShortPath()
public int getSize()
public java.lang.String getType()
public boolean exists()
public void Copy(java.lang.String destination) throws java.lang.Exception
destination
- Destination where the file or folder
is to be copied. Wildcard characters are not allowed.public void Copy(java.lang.String destination, boolean overwrite) throws java.lang.Exception
destination
- Destination where the file or folder
is to be copied. Wildcard characters are not allowed.overwrite
- Boolean value that is True (default) if
existing files or folders are to be overwritten;
False if they are not.public void Delete() throws java.lang.Exception
public void Delete(boolean force) throws java.lang.Exception
force
- Boolean value that is True if files or folders
with the read-only attribute set are to be deleted;
False (default) if they are not.public void Move(java.lang.String destination) throws java.lang.Exception
destination
- Destination where the file or folder is to be
moved. Wildcard characters are not allowed.public TextStream OpenAsTextStream()
public TextStream OpenAsTextStream(int iomode)
iomode
- Indicates input/output mode. Can be one of three
constants: ForReading, ForWriting, or ForAppending.public TextStream OpenAsTextStream(int iomode, int format)
iomode
- Indicates input/output mode. Can be one of three
constants: ForReading, ForWriting, or ForAppending.format
- One of three Tristate values used to indicate the
format of the opened file. If omitted, the file is opened
as ASCII.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |