public class FileFragmentImpl extends Object implements IFileFragment
EMPTY_ARRAY| Constructor and Description |
|---|
FileFragmentImpl(String scope,
String name,
String ext,
HostKind hostKind,
IFile enclosingFile,
int offset,
int length,
String content) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
create() |
boolean |
delete() |
boolean |
equals(Object o) |
boolean |
exists()
Indicates whether this resource exists.
|
String |
getBaseName() |
Object |
getContainer()
The file element hosting the fragment e.g., a comment or string literal
|
String |
getContent() |
IFile |
getEnclosingFile() |
String |
getExtension() |
IFileSystem |
getFileSystem()
The file system supporting this resource
|
HostKind |
getHostKind() |
int |
getLength() |
String |
getName()
Gets this file's or directory's name.
|
int |
getOffset() |
IDirectory |
getParent()
Gets this file's our directory's parent directory.
|
ResourcePath |
getPath() |
String |
getScope() |
int |
hashCode() |
boolean |
isChildOf(IDirectory dir)
Indicates whether this resource is a direct child of the given directory.
|
boolean |
isDescendantOf(IDirectory dir)
Indicates whether this resource is a descendant of the given directory.
|
boolean |
isInJar() |
boolean |
isJavaFile() |
InputStream |
openInputStream() |
OutputStream |
openOutputStream() |
OutputStream |
openOutputStreamForAppend() |
void |
setContainer(Object container) |
void |
setOffset(Supplier<Integer> offset) |
File |
toJavaFile() |
URI |
toURI() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetPhysicalFilepublic String getScope()
getScope in interface IFileFragmentpublic String getContent()
public Object getContainer()
IFileFragmentgetContainer in interface IFileFragmentpublic void setContainer(Object container)
setContainer in interface IFileFragmentpublic HostKind getHostKind()
getHostKind in interface IFileFragmentpublic IFile getEnclosingFile()
getEnclosingFile in interface IFileFragmentpublic int getOffset()
getOffset in interface IFileFragmentpublic void setOffset(Supplier<Integer> offset)
setOffset in interface IFileFragmentpublic int getLength()
getLength in interface IFileFragmentpublic InputStream openInputStream()
openInputStream in interface IFilepublic OutputStream openOutputStream()
openOutputStream in interface IFilepublic OutputStream openOutputStreamForAppend()
openOutputStreamForAppend in interface IFilepublic String getExtension()
getExtension in interface IFilepublic String getBaseName()
getBaseName in interface IFilepublic IFileSystem getFileSystem()
IResourcegetFileSystem in interface IResourcepublic IDirectory getParent()
IResourcepublic String getName()
IResourcepublic boolean exists()
IResourcepublic ResourcePath getPath()
public boolean isChildOf(IDirectory dir)
IResourcepublic boolean isDescendantOf(IDirectory dir)
IResourceisDescendantOf in interface IResourcedir - the directory which would be the ancestorpublic File toJavaFile()
toJavaFile in interface IResourcepublic boolean isJavaFile()
isJavaFile in interface IResourceCopyright © 2024. All rights reserved.