public class SftpFileObject extends Object implements IFileObject
Constructor and Description |
---|
SftpFileObject(SchemaProvider schemaProvider) |
SftpFileObject(SchemaProvider schemaProvider,
String resource) |
Modifier and Type | Method and Description |
---|---|
void |
clean()
对FileObject对象执行清理操作,清理完成后,可能会导致此对象不再可用
|
void |
delete()
删除目录或文件
|
void |
download(File dstFile) |
void |
download(OutputStream out)
下载资源
|
void |
download(String dstFile) |
void |
foreach(FileObjectFilter fileObjectFilter,
FileObjectProcessor fileObjectProcessor)
对文件对象及其所有子对象都通过文件对象过滤器进行过滤,如果匹配,则执行文件对外处理器,父文件先处理
|
void |
foreach(FileObjectFilter fileObjectFilter,
FileObjectProcessor fileObjectProcessor,
boolean parentFirst)
对文件对象及其所有子对象都通过文件对象过滤器进行过滤,如果匹配,则执行文件对外处理器
|
String |
getAbsoluteDir() |
String |
getAbsolutePath() |
FileObject |
getChild(String fileName) |
List<FileObject> |
getChildren() |
String |
getExtName() |
String |
getFileName() |
FileObject |
getFileObject(String path)
根据路径查找子对象
|
InputStream |
getInputStream() |
long |
getLastModifiedTime() |
OutputStream |
getOutputStream() |
FileObject |
getParent() |
String |
getPath() |
SchemaProvider |
getSchemaProvider() |
long |
getSize() |
URL |
getURL() |
boolean |
isExist() |
boolean |
isFolder() |
boolean |
isInPackage() |
boolean |
isModified() |
void |
resetModified()
重置为未修改状态
|
void |
setParent(FileObject fileObject) |
void |
upload(File sourceFile) |
void |
upload(InputStream in)
上传资源
|
void |
upload(String sourceFile) |
public SftpFileObject(SchemaProvider schemaProvider)
public SftpFileObject(SchemaProvider schemaProvider, String resource)
public SchemaProvider getSchemaProvider()
getSchemaProvider
in interface FileObject
public boolean isModified()
isModified
in interface FileObject
public void resetModified()
FileObject
resetModified
in interface FileObject
public URL getURL()
getURL
in interface FileObject
public String getAbsolutePath()
getAbsolutePath
in interface FileObject
public String getPath()
getPath
in interface FileObject
public String getFileName()
getFileName
in interface FileObject
public String getExtName()
getExtName
in interface FileObject
public boolean isFolder()
isFolder
in interface FileObject
public boolean isInPackage()
isInPackage
in interface FileObject
public boolean isExist()
isExist
in interface FileObject
public long getLastModifiedTime()
getLastModifiedTime
in interface FileObject
public long getSize()
getSize
in interface FileObject
public InputStream getInputStream()
getInputStream
in interface FileObject
public OutputStream getOutputStream()
getOutputStream
in interface FileObject
public FileObject getParent()
getParent
in interface FileObject
public void setParent(FileObject fileObject)
setParent
in interface FileObject
public List<FileObject> getChildren()
getChildren
in interface FileObject
public FileObject getChild(String fileName)
getChild
in interface FileObject
public void foreach(FileObjectFilter fileObjectFilter, FileObjectProcessor fileObjectProcessor, boolean parentFirst)
foreach
in interface FileObject
fileObjectFilter
- fileObjectProcessor
- parentFirst
- true:如果父亲和儿子都命中,则先处理父亲;false:如果父亲和儿子都命中,则先处理儿子public void foreach(FileObjectFilter fileObjectFilter, FileObjectProcessor fileObjectProcessor)
foreach
in interface FileObject
fileObjectFilter
- fileObjectProcessor
- public void clean()
FileObject
clean
in interface FileObject
public FileObject getFileObject(String path)
FileObject
getFileObject
in interface FileObject
public void upload(InputStream in)
IFileObject
upload
in interface IFileObject
public void upload(String sourceFile)
upload
in interface IFileObject
public void upload(File sourceFile)
upload
in interface IFileObject
public void download(OutputStream out)
IFileObject
download
in interface IFileObject
public void download(String dstFile)
download
in interface IFileObject
public void download(File dstFile)
download
in interface IFileObject
public String getAbsoluteDir()
public void delete()
FileObject
delete
in interface FileObject
Copyright © 2006–2018 TinyGroup. All rights reserved.