jasp.io
Class Folder

java.lang.Object
  |
  +--jasp.io.Folder

public class Folder
extends java.lang.Object

Contains methods and properties that allow you to create, delete, or move folders. Also allows you to query the system for folder names, paths, and various other properties. Provides access to all the properties of a folder.


Constructor Summary
Folder(java.lang.String name)
           
 
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.
 TextStream CreateTextFile(java.lang.String filename)
          Create a file as a TextStream
 TextStream CreateTextFile(java.lang.String filename, boolean overwrite)
          Create a file as a TextStream
 TextStream CreateTextFile(java.lang.String filename, boolean overwrite, boolean unicode)
          Create a file as a TextStream
 void Delete()
          Deletes a specified file
 void Delete(boolean force)
          Deletes a specified file
 int getAttributes()
           
 vbdate getDateCreated()
           
 vbdate getDateLastAccessed()
           
 vbdate getDateLastModified()
           
 java.lang.String getDrive()
           
 Files getFiles()
           
 java.lang.String getName()
           
 java.lang.String getParentFolder()
           
 java.lang.String getPath()
           
 java.lang.String getShortName()
           
 java.lang.String getShortPath()
           
 int getSize()
           
 Folders getSubFolders()
           
 java.lang.String getType()
           
 boolean IsRootFolder()
          Returns True if the specified folder is the root folder; False if it is not.
 void Move(java.lang.String destination)
          Moves a specified file or folder from one location to another.
 void setAttributes(int attr)
           
 void setName(java.lang.String n)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Folder

public Folder(java.lang.String name)
Method Detail

getType

public java.lang.String getType()

getAttributes

public int getAttributes()
                  throws java.lang.Exception

setAttributes

public void setAttributes(int attr)
                   throws java.lang.Exception

getDateCreated

public vbdate getDateCreated()

getDateLastAccessed

public vbdate getDateLastAccessed()

getDateLastModified

public vbdate getDateLastModified()

getDrive

public java.lang.String getDrive()
                          throws java.lang.Exception

getFiles

public Files getFiles()
               throws java.lang.Exception

IsRootFolder

public boolean IsRootFolder()
                     throws java.lang.Exception
Returns True if the specified folder is the root folder; False if it is not.

getName

public java.lang.String getName()
                         throws java.lang.Exception

setName

public void setName(java.lang.String n)
             throws java.lang.Exception

getParentFolder

public java.lang.String getParentFolder()
                                 throws java.lang.Exception

getPath

public java.lang.String getPath()
                         throws java.lang.Exception

getShortName

public java.lang.String getShortName()
                              throws java.lang.Exception

getShortPath

public java.lang.String getShortPath()
                              throws java.lang.Exception

getSize

public int getSize()
            throws java.lang.Exception

getSubFolders

public Folders getSubFolders()
                      throws java.lang.Exception

Copy

public void Copy(java.lang.String destination)
          throws java.lang.Exception
Copies a specified file or folder from one location to another.
Parameters:
destination - Destination where the file or folder is to be copied. Wildcard characters are not allowed.

Copy

public void Copy(java.lang.String destination,
                 boolean overwrite)
          throws java.lang.Exception
Copies a specified file or folder from one location to another.
Parameters:
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.

Delete

public void Delete()
            throws java.lang.Exception
Deletes a specified file

Delete

public void Delete(boolean force)
            throws java.lang.Exception
Deletes a specified file
Parameters:
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.

Move

public void Move(java.lang.String destination)
          throws java.lang.Exception
Moves a specified file or folder from one location to another.
Parameters:
destination - Destination where the file or folder is to be moved. Wildcard characters are not allowed.

CreateTextFile

public TextStream CreateTextFile(java.lang.String filename)
                          throws java.lang.Exception
Create a file as a TextStream
Parameters:
filename - String expression that identifies the file to create.
Returns:
Returns a TextStream object that can be used to read from or write to the file.

CreateTextFile

public TextStream CreateTextFile(java.lang.String filename,
                                 boolean overwrite)
                          throws java.lang.Exception
Create a file as a TextStream
Parameters:
filename - String expression that identifies the file to create.
overwrite - Boolean value that indicates whether you can overwrite an existing file. The value is true if the file can be overwritten, false if it can't be overwritten. If omitted, existing files are not overwritten.
Returns:
Returns a TextStream object that can be used to read from or write to the file.

CreateTextFile

public TextStream CreateTextFile(java.lang.String filename,
                                 boolean overwrite,
                                 boolean unicode)
                          throws java.lang.Exception
Create a file as a TextStream
Parameters:
filename - String expression that identifies the file to create.
overwrite - Boolean value that indicates whether you can overwrite an existing file. The value is true if the file can be overwritten, false if it can't be overwritten. If omitted, existing files are not overwritten.
unicode - Boolean value that indicates whether the file is created as a Unicode or ASCII file. The value is true if the file is created as a Unicode file, false if it's created as an ASCII file. If omitted, an ASCII file is assumed.
Returns:
Returns a TextStream object that can be used to read from or write to the file.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object