public abstract class AbstractFileObject extends Object implements FileObject
Constructor and Description |
---|
AbstractFileObject(SchemaProvider schemaProvider) |
Modifier and Type | Method and Description |
---|---|
void |
clean()
对FileObject对象执行清理操作,清理完成后,可能会导致此对象不再可用
|
void |
delete()
删除目录或文件
|
boolean |
equals(Object obj) |
void |
foreach(FileObjectFilter fileObjectFilter,
FileObjectProcessor fileObjectProcessor)
对文件对象及其所有子对象都通过文件对象过滤器进行过滤,如果匹配,则执行文件对外处理器,父文件先处理
|
void |
foreach(FileObjectFilter fileObjectFilter,
FileObjectProcessor fileObjectProcessor,
boolean parentFirst)
对文件对象及其所有子对象都通过文件对象过滤器进行过滤,如果匹配,则执行文件对外处理器
|
FileObject |
getFileObject(String path)
根据路径查找子对象
|
FileObject |
getParent() |
SchemaProvider |
getSchemaProvider() |
int |
hashCode() |
boolean |
isModified() |
void |
resetModified()
重置为未修改状态
|
void |
setParent(FileObject parent) |
String |
substringAfter(String str,
String separator) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getAbsolutePath, getChild, getChildren, getExtName, getFileName, getInputStream, getLastModifiedTime, getOutputStream, getPath, getSize, getURL, isExist, isFolder, isInPackage
public AbstractFileObject(SchemaProvider schemaProvider)
public FileObject getParent()
getParent
in interface FileObject
public void setParent(FileObject parent)
setParent
in interface FileObject
public SchemaProvider getSchemaProvider()
getSchemaProvider
in interface FileObject
public boolean isModified()
isModified
in interface FileObject
public void resetModified()
FileObject
resetModified
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 void delete()
FileObject
delete
in interface FileObject
public FileObject getFileObject(String path)
FileObject
getFileObject
in interface FileObject
Copyright © 2006–2018 TinyGroup. All rights reserved.