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 AbstractFile
IOException
public boolean createFolder() throws IOException, PermissionDeniedException
createFolder
in interface AbstractFile
IOException
PermissionDeniedException
public long lastModified() throws IOException
lastModified
in interface AbstractFile
IOException
public String getName()
getName
in interface AbstractFile
public long length() throws IOException
length
in interface AbstractFile
IOException
public SftpFileAttributes getAttributes() throws IOException, PermissionDeniedException
getAttributes
in interface AbstractFile
IOException
PermissionDeniedException
public boolean isDirectory() throws IOException
isDirectory
in interface AbstractFile
IOException
public List<AbstractFile> getChildren() throws IOException, PermissionDeniedException
getChildren
in interface AbstractFile
IOException
PermissionDeniedException
public boolean isFile() throws IOException
isFile
in interface AbstractFile
IOException
public String getAbsolutePath() throws IOException, PermissionDeniedException
getAbsolutePath
in interface AbstractFile
IOException
PermissionDeniedException
public boolean isReadable() throws IOException
isReadable
in interface AbstractFile
IOException
public boolean createNewFile() throws PermissionDeniedException, IOException
createNewFile
in interface AbstractFile
PermissionDeniedException
IOException
public void truncate() throws PermissionDeniedException, IOException
truncate
in interface AbstractFile
PermissionDeniedException
IOException
public InputStream getInputStream() throws IOException
getInputStream
in interface AbstractFile
IOException
public void setAttributes(SftpFileAttributes attrs) throws IOException, PermissionDeniedException
setAttributes
in interface AbstractFile
IOException
PermissionDeniedException
public String getCanonicalPath() throws IOException, PermissionDeniedException
getCanonicalPath
in interface AbstractFile
IOException
PermissionDeniedException
public boolean supportsRandomAccess()
supportsRandomAccess
in interface AbstractFile
public AbstractFileRandomAccess openFile(boolean writeAccess) throws IOException
openFile
in interface AbstractFile
IOException
public boolean isHidden() throws IOException
isHidden
in interface AbstractFile
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface AbstractFile
IOException
public boolean isWritable() throws IOException
isWritable
in interface AbstractFile
IOException
public void copyFrom(AbstractFile src) throws IOException, PermissionDeniedException
copyFrom
in interface AbstractFile
IOException
PermissionDeniedException
public void moveTo(AbstractFile target) throws IOException, PermissionDeniedException
moveTo
in interface AbstractFile
IOException
PermissionDeniedException
public boolean delete(boolean recursive) throws IOException, PermissionDeniedException
delete
in interface AbstractFile
IOException
PermissionDeniedException
public void refresh()
refresh
in interface AbstractFile
public OutputStream getOutputStream(boolean append) throws IOException
getOutputStream
in interface AbstractFile
IOException
public AbstractFile resolveFile(String child) throws IOException, PermissionDeniedException
resolveFile
in interface AbstractFile
IOException
PermissionDeniedException
public AbstractFileFactory<? extends AbstractFile> getFileFactory()
getFileFactory
in interface AbstractFile
Copyright © 2024. All rights reserved.