public abstract class AbstractDirectFile<T extends AbstractDirectFile<T>> extends AbstractFileImpl<T>
| Modifier and Type | Field and Description |
|---|---|
protected File |
f |
protected boolean |
hidden |
protected String |
homeDir |
con, fileFactory| Constructor and Description |
|---|
AbstractDirectFile(String path,
AbstractFileFactory<T> fileFactory,
Connection con,
String homeDir) |
| Modifier and Type | Method and Description |
|---|---|
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 |
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() |
copyFrom, getFileFactory, getOutputStreamclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildren, resolveFilepublic AbstractDirectFile(String path, AbstractFileFactory<T> fileFactory, Connection con, String homeDir) throws IOException
IOExceptionpublic boolean exists()
public boolean createFolder()
throws PermissionDeniedException
PermissionDeniedExceptionpublic long lastModified()
public String getName()
public long length()
public abstract SftpFileAttributes getAttributes() throws FileNotFoundException
FileNotFoundExceptionpublic boolean isDirectory()
public boolean isFile()
public String getAbsolutePath() throws IOException
IOExceptionpublic boolean isReadable()
public boolean isWritable()
public boolean createNewFile()
throws PermissionDeniedException,
IOException
PermissionDeniedExceptionIOExceptionpublic void truncate()
throws PermissionDeniedException,
IOException
PermissionDeniedExceptionIOExceptionpublic InputStream getInputStream() throws IOException
IOExceptionpublic OutputStream getOutputStream() throws IOException
IOExceptionpublic boolean delete(boolean recurse)
public void moveTo(AbstractFile f2) throws IOException, PermissionDeniedException
moveTo in interface AbstractFilemoveTo in class AbstractFileImpl<T extends AbstractDirectFile<T>>IOExceptionPermissionDeniedExceptionpublic void setAttributes(SftpFileAttributes attrs)
public String getCanonicalPath() throws IOException
IOExceptionpublic boolean supportsRandomAccess()
public AbstractFileRandomAccess openFile(boolean writeAccess) throws IOException
IOExceptionpublic boolean isHidden()
public void refresh()
Copyright © 2025. All rights reserved.