com.maverick.sshd.fs
Class AbstractDirectFile<T extends AbstractDirectFile<T>>

java.lang.Object
  extended by com.maverick.sshd.fs.AbstractFileImpl<T,NoMount>
      extended by com.maverick.sshd.fs.AbstractDirectFile<T>
All Implemented Interfaces:
AbstractFile
Direct Known Subclasses:
DirectFile

public abstract class AbstractDirectFile<T extends AbstractDirectFile<T>>
extends AbstractFileImpl<T,NoMount>


Field Summary
 
Fields inherited from class com.maverick.sshd.fs.AbstractFileImpl
con, fileFactory
 
Constructor Summary
AbstractDirectFile(String path, AbstractFileFactory<T,NoMount> fileFactory, Connection con, String homeDir)
           
 
Method Summary
 boolean createFolder()
           
 boolean createNewFile()
           
 boolean delete(boolean recurse)
           
 boolean exists()
           
 String getAbsolutePath()
           
abstract  SftpFileAttributes getAttributes()
           
 String getCanonicalPath()
           
 InputStream getInputStream()
           
 String getName()
           
 OutputStream getOutputStream()
           
 boolean isDirectory()
           
 boolean isFile()
           
 boolean isHidden()
           
 boolean isMount()
           
 boolean isReadable()
           
 boolean isWritable()
           
 long lastModified()
           
 long length()
           
 void moveTo(AbstractFile f2)
           
 AbstractFileRandomAccess openFile(boolean writeAccess)
           
 void refresh()
           
 void setAttributes(SftpFileAttributes attrs)
           
 boolean supportsRandomAccess()
           
 void truncate()
           
 
Methods inherited from class com.maverick.sshd.fs.AbstractFileImpl
copyFrom, getOutputStream, resolveFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.maverick.sshd.sftp.AbstractFile
getChildren
 

Constructor Detail

AbstractDirectFile

public AbstractDirectFile(String path,
                          AbstractFileFactory<T,NoMount> fileFactory,
                          Connection con,
                          String homeDir)
                   throws IOException
Throws:
IOException
Method Detail

exists

public boolean exists()

createFolder

public boolean createFolder()
                     throws PermissionDeniedException
Throws:
PermissionDeniedException

lastModified

public long lastModified()

getName

public String getName()

length

public long length()

getAttributes

public abstract SftpFileAttributes getAttributes()
                                          throws FileNotFoundException
Throws:
FileNotFoundException

isDirectory

public boolean isDirectory()

isFile

public boolean isFile()

getAbsolutePath

public String getAbsolutePath()
                       throws IOException
Throws:
IOException

isReadable

public boolean isReadable()

isWritable

public boolean isWritable()

createNewFile

public boolean createNewFile()
                      throws PermissionDeniedException,
                             IOException
Throws:
PermissionDeniedException
IOException

truncate

public void truncate()
              throws PermissionDeniedException,
                     IOException
Throws:
PermissionDeniedException
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Throws:
IOException

delete

public boolean delete(boolean recurse)

moveTo

public void moveTo(AbstractFile f2)
            throws IOException,
                   PermissionDeniedException
Throws:
IOException
PermissionDeniedException

setAttributes

public void setAttributes(SftpFileAttributes attrs)

getCanonicalPath

public String getCanonicalPath()
                        throws IOException
Throws:
IOException

supportsRandomAccess

public boolean supportsRandomAccess()

openFile

public AbstractFileRandomAccess openFile(boolean writeAccess)
                                  throws IOException
Throws:
IOException

isHidden

public boolean isHidden()

isMount

public boolean isMount()
                throws IOException,
                       PermissionDeniedException
Throws:
IOException
PermissionDeniedException

refresh

public void refresh()


Copyright © 2012. All Rights Reserved.