public class AbstractFile extends File implements IAbstractFile
IAbstractFile
,
Serialized FormpathSeparator, pathSeparatorChar, separator, separatorChar
Modifier and Type | Method and Description |
---|---|
void |
addAbstractFileListener(IAbstractFileListener listener) |
boolean |
equals(Object object) |
protected void |
fireFileLockedEvent(IFileLocker locker) |
protected void |
fireFileReleasedEvent(IFileLocker locker,
boolean modified) |
File |
getFile()
Returns the file object assigned to the abstracted file.
|
IFileLocker |
getFileLocker()
Returns the current file locker.
|
String |
getFullPath()
Returns the full path of the file.
|
long |
getLastModified()
Get the timestamp with the the last modification time of the file.
|
IAbstractFolder |
getParentFolder()
Returns the parent folder of the file.
|
File |
getPathFile()
Returns the path of the the file.
|
IProject |
getProject()
Returns the hosting project of the file.
|
String |
getTitle()
Returns the title of the file.
|
int |
hashCode() |
boolean |
isLocked()
Returns the current lock state of the file.
|
void |
releaseLock(IFileLocker locker)
Releases the lock on the file.
|
void |
removeAbstractFileListener(IAbstractFileListener listener) |
void |
requestLock(IFileLocker locker)
Requests the file to lock it, so the file locker can change the file.
|
void |
setName(String name,
IWorkbench workbench)
Sets the name of the file.
|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getName
public void addAbstractFileListener(IAbstractFileListener listener)
addAbstractFileListener
in interface IAbstractFile
public void removeAbstractFileListener(IAbstractFileListener listener)
removeAbstractFileListener
in interface IAbstractFile
protected void fireFileLockedEvent(IFileLocker locker)
protected void fireFileReleasedEvent(IFileLocker locker, boolean modified)
public IAbstractFolder getParentFolder()
IAbstractFile
getParentFolder
in interface IAbstractFile
public IProject getProject()
IAbstractFile
getProject
in interface IAbstractFile
public File getFile()
IAbstractFile
getFile
in interface IAbstractFile
public File getPathFile()
IAbstractFile
getPathFile
in interface IAbstractFile
public String getFullPath()
IAbstractFile
getFullPath
in interface IAbstractFile
public String getTitle()
IAbstractFile
getTitle
in interface IAbstractFile
public void setName(String name, IWorkbench workbench) throws FileRenameException
IAbstractFile
setName
in interface IAbstractFile
name
- the new name for the fileFileRenameException
- - if the file cannot be renamedpublic long getLastModified()
IAbstractFile
getLastModified
in interface IAbstractFile
public boolean isLocked()
IAbstractFile
isLocked
in interface IAbstractFile
public void releaseLock(IFileLocker locker)
IAbstractFile
releaseLock
in interface IAbstractFile
locker
- the file locker that initially locked the filepublic IFileLocker getFileLocker()
IAbstractFile
getFileLocker
in interface IAbstractFile
public void requestLock(IFileLocker locker) throws FileAlreadyLockedException
IAbstractFile
requestLock
in interface IAbstractFile
locker
- the file locker that want to lock the fileFileAlreadyLockedException
- - if the file is already locked by another file locker