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, wait
getPhysicalFile
public String getScope()
getScope
in interface IFileFragment
public String getContent()
public Object getContainer()
IFileFragment
getContainer
in interface IFileFragment
public void setContainer(Object container)
setContainer
in interface IFileFragment
public HostKind getHostKind()
getHostKind
in interface IFileFragment
public IFile getEnclosingFile()
getEnclosingFile
in interface IFileFragment
public int getOffset()
getOffset
in interface IFileFragment
public void setOffset(Supplier<Integer> offset)
setOffset
in interface IFileFragment
public int getLength()
getLength
in interface IFileFragment
public InputStream openInputStream()
openInputStream
in interface IFile
public OutputStream openOutputStream()
openOutputStream
in interface IFile
public OutputStream openOutputStreamForAppend()
openOutputStreamForAppend
in interface IFile
public String getExtension()
getExtension
in interface IFile
public String getBaseName()
getBaseName
in interface IFile
public IFileSystem getFileSystem()
IResource
getFileSystem
in interface IResource
public IDirectory getParent()
IResource
public String getName()
IResource
public boolean exists()
IResource
public ResourcePath getPath()
public boolean isChildOf(IDirectory dir)
IResource
public boolean isDescendantOf(IDirectory dir)
IResource
isDescendantOf
in interface IResource
dir
- the directory which would be the ancestorpublic File toJavaFile()
toJavaFile
in interface IResource
public boolean isJavaFile()
isJavaFile
in interface IResource
Copyright © 2024. All rights reserved.