de.grogra.vfs
Class LocalFileSystem

java.lang.Object
  extended by de.grogra.util.TreeModelSupport
      extended by de.grogra.vfs.FileSystem
          extended by de.grogra.vfs.LocalFileSystem
All Implemented Interfaces:
javax.swing.tree.TreeModel

public final class LocalFileSystem
extends FileSystem


Nested Class Summary
 
Nested classes/interfaces inherited from class de.grogra.vfs.FileSystem
FileSystem.Out
 
Field Summary
static LocalFileSystem FILE_ADAPTER
           
protected  java.io.File root
           
 
Fields inherited from class de.grogra.vfs.FileSystem
fileNameMap, manifest, MIME_TYPE
 
Fields inherited from class de.grogra.util.TreeModelSupport
NODES_CHANGED, NODES_INSERTED, NODES_REMOVED, STRUCTURE_CHANGED
 
Constructor Summary
LocalFileSystem(java.lang.String fsName, java.io.File root)
           
 
Method Summary
 java.lang.Object addLocalFile(java.io.File source, java.lang.Object targetDir, java.lang.String name)
           
protected  java.lang.Object createImpl(java.lang.Object parent, java.lang.String name, boolean createDirectory)
           
 void delete(java.lang.Object file)
           
protected  java.lang.Object fireInserted(java.lang.Object createImplRet)
           
 java.lang.Object getFile(java.lang.Object parent, java.lang.String name)
           
 java.io.InputStream getInputStream(java.lang.Object file)
           
 java.lang.String getName(java.lang.Object file)
           
 java.io.OutputStream getOutputStream(java.lang.Object file, boolean append)
           
 java.lang.Object getParent(java.lang.Object file)
           
 java.lang.Object getRoot()
           
 long getSize(java.lang.Object file)
           
 long getTime(java.lang.Object file)
           
 boolean isLeaf(java.lang.Object file)
           
 boolean isPersistent()
           
 boolean isReadOnly(java.lang.Object file)
           
 java.lang.Object[] listFiles(java.lang.Object parent)
           
 void setTime(java.lang.Object file, long time)
           
 java.lang.Object toFile(java.net.URL url)
           
 java.net.URL toURL(java.lang.Object file)
           
 
Methods inherited from class de.grogra.vfs.FileSystem
copyFilesTo, copyFileTo, copyFileTo, copyFileToDirectory, copyFileToDirectory, create, create, equals, getAttribute, getAttribute, getAttributes, getCharset, getChild, getChildCount, getEventFor, getFile, getFile, getFSName, getIndexOfChild, getManifest, getManifestName, getMimeType, getPath, getPathWithLeadingSlash, getProtocol, getReader, getTreePath, getWriter, isContainedInChildren, readJar, removeNonlistedAttributes, setFileNameMap, setManifest, setMimeType, valueForPathChanged, writeJar
 
Methods inherited from class de.grogra.util.TreeModelSupport
addTreeModelListener, allListenersRemoved, clearListeners, fireTreeModelEvent, fireTreeModelEvent, fireTreeModelEvent, fireTreeModelEvent, firstListenerAdded, hasListeners, removeTreeModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, removeTreeModelListener
 

Field Detail

FILE_ADAPTER

public static final LocalFileSystem FILE_ADAPTER

root

protected final java.io.File root
Constructor Detail

LocalFileSystem

public LocalFileSystem(java.lang.String fsName,
                       java.io.File root)
Method Detail

addLocalFile

public java.lang.Object addLocalFile(java.io.File source,
                                     java.lang.Object targetDir,
                                     java.lang.String name)
                              throws java.io.IOException
Overrides:
addLocalFile in class FileSystem
Throws:
java.io.IOException

createImpl

protected java.lang.Object createImpl(java.lang.Object parent,
                                      java.lang.String name,
                                      boolean createDirectory)
                               throws java.io.IOException
Specified by:
createImpl in class FileSystem
Throws:
java.io.IOException

delete

public void delete(java.lang.Object file)
            throws java.io.IOException
Specified by:
delete in class FileSystem
Throws:
java.io.IOException

fireInserted

protected java.lang.Object fireInserted(java.lang.Object createImplRet)
Overrides:
fireInserted in class FileSystem

getFile

public java.lang.Object getFile(java.lang.Object parent,
                                java.lang.String name)
Specified by:
getFile in class FileSystem

getInputStream

public java.io.InputStream getInputStream(java.lang.Object file)
                                   throws java.io.IOException
Specified by:
getInputStream in class FileSystem
Throws:
java.io.IOException

getName

public java.lang.String getName(java.lang.Object file)
Specified by:
getName in class FileSystem

getOutputStream

public java.io.OutputStream getOutputStream(java.lang.Object file,
                                            boolean append)
                                     throws java.io.IOException
Specified by:
getOutputStream in class FileSystem
Throws:
java.io.IOException

getParent

public java.lang.Object getParent(java.lang.Object file)
Specified by:
getParent in class FileSystem

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel
Specified by:
getRoot in class FileSystem

getSize

public long getSize(java.lang.Object file)
Specified by:
getSize in class FileSystem

getTime

public long getTime(java.lang.Object file)
Specified by:
getTime in class FileSystem

isLeaf

public boolean isLeaf(java.lang.Object file)

isPersistent

public boolean isPersistent()
Specified by:
isPersistent in class FileSystem

isReadOnly

public boolean isReadOnly(java.lang.Object file)
Specified by:
isReadOnly in class FileSystem

listFiles

public java.lang.Object[] listFiles(java.lang.Object parent)
Specified by:
listFiles in class FileSystem

setTime

public void setTime(java.lang.Object file,
                    long time)
Specified by:
setTime in class FileSystem

toFile

public java.lang.Object toFile(java.net.URL url)
Specified by:
toFile in class FileSystem

toURL

public java.net.URL toURL(java.lang.Object file)
Specified by:
toURL in class FileSystem