public class AbstractFileAdapter extends Object implements AbstractFile
| Modifier and Type | Field and Description |
|---|---|
protected AbstractFile |
file |
| Constructor and Description |
|---|
AbstractFileAdapter() |
AbstractFileAdapter(AbstractFile file) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyFrom(AbstractFile src) |
boolean |
createFolder() |
boolean |
createNewFile() |
boolean |
delete(boolean recursive) |
boolean |
exists() |
String |
getAbsolutePath() |
SftpFileAttributes |
getAttributes() |
String |
getCanonicalPath() |
List<AbstractFile> |
getChildren() |
AbstractFileFactory<? extends AbstractFile> |
getFileFactory() |
InputStream |
getInputStream() |
String |
getName() |
OutputStream |
getOutputStream() |
OutputStream |
getOutputStream(boolean append) |
protected void |
init(AbstractFile file) |
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isHidden() |
boolean |
isReadable() |
boolean |
isWritable() |
long |
lastModified() |
long |
length() |
void |
moveTo(AbstractFile target) |
AbstractFileRandomAccess |
openFile(boolean writeAccess) |
void |
refresh() |
AbstractFile |
resolveFile(String child) |
void |
setAttributes(SftpFileAttributes attrs) |
boolean |
supportsRandomAccess() |
void |
truncate() |
protected AbstractFile file
public AbstractFileAdapter(AbstractFile file)
public AbstractFileAdapter()
protected void init(AbstractFile file)
public boolean exists()
throws IOException
exists in interface AbstractFileIOExceptionpublic boolean createFolder()
throws IOException,
PermissionDeniedException
createFolder in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic long lastModified()
throws IOException
lastModified in interface AbstractFileIOExceptionpublic String getName()
getName in interface AbstractFilepublic long length()
throws IOException
length in interface AbstractFileIOExceptionpublic SftpFileAttributes getAttributes() throws IOException, PermissionDeniedException
getAttributes in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic boolean isDirectory()
throws IOException
isDirectory in interface AbstractFileIOExceptionpublic List<AbstractFile> getChildren() throws IOException, PermissionDeniedException
getChildren in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic boolean isFile()
throws IOException
isFile in interface AbstractFileIOExceptionpublic String getAbsolutePath() throws IOException, PermissionDeniedException
getAbsolutePath in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic boolean isReadable()
throws IOException
isReadable in interface AbstractFileIOExceptionpublic boolean createNewFile()
throws PermissionDeniedException,
IOException
createNewFile in interface AbstractFilePermissionDeniedExceptionIOExceptionpublic void truncate()
throws PermissionDeniedException,
IOException
truncate in interface AbstractFilePermissionDeniedExceptionIOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in interface AbstractFileIOExceptionpublic void setAttributes(SftpFileAttributes attrs) throws IOException, PermissionDeniedException
setAttributes in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic String getCanonicalPath() throws IOException, PermissionDeniedException
getCanonicalPath in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic boolean supportsRandomAccess()
supportsRandomAccess in interface AbstractFilepublic AbstractFileRandomAccess openFile(boolean writeAccess) throws IOException
openFile in interface AbstractFileIOExceptionpublic boolean isHidden()
throws IOException
isHidden in interface AbstractFileIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface AbstractFileIOExceptionpublic boolean isWritable()
throws IOException
isWritable in interface AbstractFileIOExceptionpublic void copyFrom(AbstractFile src) throws IOException, PermissionDeniedException
copyFrom in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic void moveTo(AbstractFile target) throws IOException, PermissionDeniedException
moveTo in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic boolean delete(boolean recursive)
throws IOException,
PermissionDeniedException
delete in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic void refresh()
refresh in interface AbstractFilepublic OutputStream getOutputStream(boolean append) throws IOException
getOutputStream in interface AbstractFileIOExceptionpublic AbstractFile resolveFile(String child) throws IOException, PermissionDeniedException
resolveFile in interface AbstractFileIOExceptionPermissionDeniedExceptionpublic AbstractFileFactory<? extends AbstractFile> getFileFactory()
getFileFactory in interface AbstractFileCopyright © 2025. All rights reserved.