public class ResourceHandle extends FilesystemHandle
APPEND, READ, WRITE| Constructor and Description |
|---|
ResourceHandle(IFile file,
int mode) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
createFile(boolean createHierarchy)
Create a file.
|
static boolean |
createFolder(IContainer container)
Create a new container on the workbench.
|
boolean |
exists()
Check if a physical file exists.
|
java.lang.Object |
getFile()
Get the base file object.
|
boolean |
write(byte[] data)
Write data to a file.
|
boolean |
write(java.lang.String data)
Write data to a file.
|
close, read, readLine, setModepublic ResourceHandle(IFile file, int mode)
public boolean write(java.lang.String data)
IFileHandlewrite in interface IFileHandlewrite in class FilesystemHandledata - data to writetrue on successpublic boolean write(byte[] data)
IFileHandlewrite in interface IFileHandlewrite in class FilesystemHandledata - data to writetrue on successpublic boolean exists()
IFileHandleexists in interface IFileHandleexists in class FilesystemHandletrue when file existspublic boolean createFile(boolean createHierarchy)
throws CoreException
IFileHandlecreateFile in interface IFileHandlecreateFile in class FilesystemHandlecreateHierarchy - create parent folders if they do not existtrue on successCoreExceptionpublic static boolean createFolder(IContainer container) throws CoreException
container - container to createtrue on successCoreException - thrown when folder cannot be createdpublic java.lang.Object getFile()
IFileHandleIFile or a File instance.getFile in interface IFileHandlegetFile in class FilesystemHandle