de.miethxml.toolkit.io
Interface FileModel

All Known Implementing Classes:
DefaultFileModel, VFSFileModel

public interface FileModel

Author:
simon

Method Summary
 FileModel createDirectory(java.lang.String name)
          Create a directory relative to this FileModel
 FileModel createFile(java.lang.String name)
          Create a file relative to this FileModel.
 boolean delete()
           
 boolean exists()
           
 FileModel getChild(int index)
           
 int getChildCount()
           
 FileModel[] getChildren()
           
 FileModelContent getContent()
           
 long getLength()
           
 java.lang.String getName()
           
 FileModel getParent()
           
 java.lang.String getPath()
           
 boolean isFile()
           
 long lastModified()
           
 void renameTo(java.lang.String name)
           
 

Method Detail

isFile

public boolean isFile()

lastModified

public long lastModified()

getLength

public long getLength()

getName

public java.lang.String getName()

renameTo

public void renameTo(java.lang.String name)

getPath

public java.lang.String getPath()

getParent

public FileModel getParent()

getChildCount

public int getChildCount()

getChild

public FileModel getChild(int index)

getChildren

public FileModel[] getChildren()

getContent

public FileModelContent getContent()

exists

public boolean exists()

delete

public boolean delete()

createDirectory

public FileModel createDirectory(java.lang.String name)
                          throws FileModelException
Create a directory relative to this FileModel

Parameters:
name -
Returns:
Throws:
FileModelException

createFile

public FileModel createFile(java.lang.String name)
                     throws FileModelException
Create a file relative to this FileModel. If this is a file the new file will created in the same directory.

Parameters:
name -
Returns:
Throws:
java.lang.Exception
FileModelException