
public class R66File extends FilesystemBasedFileImpl
currentFile, currentRealFile, 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 FileInputStream |
getFileInputStream() |
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, canRead, clear, exists, getDir, getFile, getFileFromPath, getPosition, getRelativePath, isDirectory, isFile, isInReading, isInWriting, readDataBlock, 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 final void retrieveBlocking(AtomicBoolean running) throws OpenR66RunnerErrorException, OpenR66ProtocolSystemException
running - When false, should stop the runnerOpenR66RunnerErrorExceptionOpenR66ProtocolSystemExceptionpublic final File getTrueFile()
public final String getBasename()
public static String getBasename(String path)
path - public final R66Session getSession()
getSession in interface FileInterfacegetSession in class FilesystemBasedFileImplpublic final boolean canRead()
throws CommandAbstractException
canRead in interface FileInterfacecanRead in class FilesystemBasedFileImplCommandAbstractExceptionpublic final boolean canWrite()
throws CommandAbstractException
canWrite in interface FileInterfacecanWrite in class FilesystemBasedFileImplCommandAbstractExceptionpublic final boolean delete()
throws CommandAbstractException
FileInterfacedelete in interface FileInterfacedelete in class FilesystemBasedFileImplCommandAbstractExceptionpublic final boolean exists()
throws CommandAbstractException
exists in interface FileInterfaceexists in class FilesystemBasedFileImplCommandAbstractExceptionprotected final FileInputStream getFileInputStream()
getFileInputStream in class FilesystemBasedFileImplprotected final RandomAccessFile getRandomFile()
FilesystemBasedFileImplgetRandomFile in class FilesystemBasedFileImplprotected final FileOutputStream getFileOutputStream(boolean append)
getFileOutputStream in class FilesystemBasedFileImplappend - True if the FileOutputStream should be in append
modepublic final boolean isDirectory()
throws CommandAbstractException
FileInterfaceisDirectory in interface FileInterfaceisDirectory in class FilesystemBasedFileImplCommandAbstractExceptionpublic final boolean isFile()
throws CommandAbstractException
FileInterfaceisFile in interface FileInterfaceisFile in class FilesystemBasedFileImplCommandAbstractExceptionpublic final long length()
throws CommandAbstractException
length in interface FileInterfacelength in class FilesystemBasedFileImplCommandAbstractExceptionprotected final String getFullInDir()
public final 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 final boolean renameTo(String path, boolean external) throws CommandAbstractException
path - external - if True, the path is outside authentication
controlCommandAbstractExceptionpublic final void replaceFilename(String filename, boolean isExternal) throws CommandAbstractException
filename - isExternal - CommandAbstractExceptionpublic final boolean closeFile()
throws CommandAbstractException
FileInterfacecloseFile in interface FileInterfacecloseFile in class FilesystemBasedFileImplCommandAbstractExceptionpublic final boolean isExternal()
Copyright © 2009–2022 Waarp. All rights reserved.