de.miethxml.toolkit.io
Class VFSFileModel

java.lang.Object
  extended byde.miethxml.toolkit.io.VFSFileModel
All Implemented Interfaces:
FileModel

public class VFSFileModel
extends java.lang.Object
implements FileModel

Author:
simon

Constructor Summary
VFSFileModel(org.apache.commons.vfs.FileObject f, FileModel parent)
           
 
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)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VFSFileModel

public VFSFileModel(org.apache.commons.vfs.FileObject f,
                    FileModel parent)
Method Detail

isFile

public boolean isFile()
Specified by:
isFile in interface FileModel

lastModified

public long lastModified()
Specified by:
lastModified in interface FileModel

getLength

public long getLength()
Specified by:
getLength in interface FileModel

getName

public java.lang.String getName()
Specified by:
getName in interface FileModel

renameTo

public void renameTo(java.lang.String name)
Specified by:
renameTo in interface FileModel

getPath

public java.lang.String getPath()
Specified by:
getPath in interface FileModel

getParent

public FileModel getParent()
Specified by:
getParent in interface FileModel

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface FileModel

getChild

public FileModel getChild(int index)
Specified by:
getChild in interface FileModel

getChildren

public FileModel[] getChildren()
Specified by:
getChildren in interface FileModel

toString

public java.lang.String toString()

getContent

public FileModelContent getContent()
Specified by:
getContent in interface FileModel

delete

public boolean delete()
Specified by:
delete in interface FileModel

exists

public boolean exists()
Specified by:
exists in interface FileModel

createDirectory

public FileModel createDirectory(java.lang.String name)
                          throws FileModelException
Description copied from interface: FileModel
Create a directory relative to this FileModel

Specified by:
createDirectory in interface FileModel
Parameters:
name -
Returns:
Throws:
FileModelException

createFile

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

Specified by:
createFile in interface FileModel
Parameters:
name -
Returns:
Throws:
FileModelException