public interface IAbstractFile
Modifier and Type | Method and Description |
---|---|
void |
addAbstractFileListener(IAbstractFileListener listener) |
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.
|
String |
getName()
Returns the name 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.
|
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.
|
long getLastModified()
IAbstractFolder getParentFolder()
IProject getProject()
void requestLock(IFileLocker locker) throws FileAlreadyLockedException
locker
- the file locker that want to lock the fileFileAlreadyLockedException
- - if the file is already locked by another file lockervoid releaseLock(IFileLocker locker)
locker
- the file locker that initially locked the fileIFileLocker getFileLocker()
boolean isLocked()
void addAbstractFileListener(IAbstractFileListener listener)
void removeAbstractFileListener(IAbstractFileListener listener)
File getFile()
File getPathFile()
String getFullPath()
String getTitle()
String getName()
void setName(String name, IWorkbench workbench) throws FileRenameException
name
- the new name for the fileFileRenameException
- - if the file cannot be renamed