
public class R66File extends FilesystemBasedFileImpl
currentFile, isAppend, sessionisReady| Constructor and Description | 
|---|
| R66File(R66Session session,
       R66Dir dir,
       String path)This constructor is for External file | 
| R66File(R66Session session,
       R66Dir dir,
       String path,
       boolean append) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | canRead() | 
| boolean | canWrite() | 
| boolean | closeFile()Close the current FileInterface | 
| boolean | delete()Delete the current FileInterface. | 
| boolean | exists() | 
| String | getBasename() | 
| static String | getBasename(String path) | 
| protected FileChannel | getFileChannel()Returns the FileChannel in In mode associated with the current file. | 
| protected FileOutputStream | getFileOutputStream(boolean append)Returns the FileOutputStream in Out mode associated with the current
 file. | 
| protected String | getFullInDir() | 
| protected RandomAccessFile | getRandomFile()Returns the RandomAccessFile in Out mode associated with the current
 file. | 
| R66Session | getSession() | 
| File | getTrueFile()This method is a good to have in a true FileInterface implementation. | 
| boolean | isDirectory()Is the current FileInterface a directory and exists | 
| boolean | isExternal() | 
| boolean | isFile()Is the current FileInterface a file and exists | 
| long | length() | 
| boolean | renameTo(String path)Rename the current FileInterface into a new filename from argument | 
| boolean | renameTo(String path,
        boolean external)Move the current file to the path as destination | 
| void | replaceFilename(String filename,
               boolean isExternal)Replace the current file with the new filename after closing the previous
 one. | 
| void | retrieveBlocking(AtomicBoolean running)Start the retrieve (send to the remote host the local file) | 
| String | toString() | 
abortFile, clear, get, getDir, getFile, getFileFromPath, getPosition, getRelativePath, isInReading, isInWriting, readDataBlock, setPosition, writeDataBlockcheckIdentify, getMarker, restartMarker, retrieve, storepublic R66File(R66Session session, R66Dir dir, String path, boolean append) throws CommandAbstractException
session - dir - path - append - CommandAbstractExceptionpublic R66File(R66Session session, R66Dir dir, String path)
session - dir - path - public void retrieveBlocking(AtomicBoolean running) throws OpenR66RunnerErrorException, OpenR66ProtocolSystemException
running - When false, should stop the runnerOpenR66RunnerErrorExceptionOpenR66ProtocolSystemExceptionpublic File getTrueFile()
public String getBasename()
public static String getBasename(String path)
path - public R66Session getSession()
getSession in interface FileInterfacegetSession in class FilesystemBasedFileImplpublic boolean canRead()
                throws CommandAbstractException
canRead in interface FileInterfacecanRead in class FilesystemBasedFileImplCommandAbstractExceptionpublic boolean canWrite()
                 throws CommandAbstractException
canWrite in interface FileInterfacecanWrite in class FilesystemBasedFileImplCommandAbstractExceptionpublic boolean delete()
               throws CommandAbstractException
FileInterfacedelete in interface FileInterfacedelete in class FilesystemBasedFileImplCommandAbstractExceptionpublic boolean exists()
               throws CommandAbstractException
exists in interface FileInterfaceexists in class FilesystemBasedFileImplCommandAbstractExceptionprotected FileChannel getFileChannel()
FilesystemBasedFileImplgetFileChannel in class FilesystemBasedFileImplprotected RandomAccessFile getRandomFile()
FilesystemBasedFileImplgetRandomFile in class FilesystemBasedFileImplprotected FileOutputStream getFileOutputStream(boolean append)
getFileOutputStream in class FilesystemBasedFileImplappend - True if the FileOutputStream should be in append
     modepublic boolean isDirectory()
                    throws CommandAbstractException
FileInterfaceisDirectory in interface FileInterfaceisDirectory in class FilesystemBasedFileImplCommandAbstractExceptionpublic boolean isFile()
               throws CommandAbstractException
FileInterfaceisFile in interface FileInterfaceisFile in class FilesystemBasedFileImplCommandAbstractExceptionpublic long length()
            throws CommandAbstractException
length in interface FileInterfacelength in class FilesystemBasedFileImplCommandAbstractExceptionprotected String getFullInDir()
public boolean renameTo(String path) throws CommandAbstractException
FileInterfacerenameTo in interface FileInterfacerenameTo in class FilesystemBasedFileImplpath - the new filename (path could be relative or absolute
     -
     without mount point)CommandAbstractExceptionpublic boolean renameTo(String path, boolean external) throws CommandAbstractException
path - external - if True, the path is outside authentication
     controlCommandAbstractExceptionpublic void replaceFilename(String filename, boolean isExternal) throws CommandAbstractException
filename - isExternal - CommandAbstractExceptionpublic boolean closeFile()
                  throws CommandAbstractException
FileInterfacecloseFile in interface FileInterfacecloseFile in class FilesystemBasedFileImplCommandAbstractExceptionpublic boolean isExternal()
Copyright © 2009–2020 Waarp. All rights reserved.