public interface IDfFile
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
Returns true if caller has read permission on the file and
the underlying file system / OS determines the file can
be opened for reading.
|
boolean |
canWrite()
Returns true if caller has write permission on the file and
the underlying file system / OS determines the file can be
opened for writing.
|
void |
deleteFile()
Deletes the file in the file system.
|
boolean |
equals(java.lang.Object fileSpec)
Returns
true if the argument is an instance of an IDfFile
and it represents the same file path as this object. |
boolean |
exists()
Returns true if the file path references an actual file.
|
java.lang.String |
getDirectory()
Returns the path up to but not including the file name / extension.
|
java.lang.String |
getExtension()
Returns the extension portion of the file name, if any.
|
java.lang.String |
getFullPath()
Returns the absolute path for the file.
|
java.lang.String |
getMacResourcePath()
Return the absolute mac resource file path.
|
java.lang.String |
getName()
Returns just the file name portion of the path.
|
java.lang.String |
getSeparator()
Returns the string (usually one character) that is used as the
path element separator (e.g. in DOS it would be '\').
|
java.lang.String |
getURI()
Return the absolute path for the file as a URI.
|
void |
renameTo(java.lang.String newPath)
Renames the file on disk to the specified name.
|
void |
setDirectory(java.lang.String dirPath)
Sets the directory path for the file.
|
void |
setExtension(java.lang.String newExtension)
Sets the extension portion of the file name.
|
void |
setFullPath(java.lang.String filePath)
Sets the absolute path for the file.
|
void |
setMacResourcePath(java.lang.String macFilePath)
Set the absolute Mac Resource File Path
|
void |
setName(java.lang.String fileName)
Sets a new file name.
|
java.lang.String getName()
void setName(java.lang.String fileName)
fileName
- new file name; will be appended to existing dir path to form complete path.java.lang.String getExtension()
void setExtension(java.lang.String newExtension)
newExtension
- new extennsion to set.java.lang.String getDirectory()
void setDirectory(java.lang.String dirPath)
dirPath
- new directory path string..java.lang.String getFullPath()
void setFullPath(java.lang.String filePath)
filePath
- new absolute file path.java.lang.String getSeparator()
boolean exists()
void renameTo(java.lang.String newPath)
newPath
- new file name.void deleteFile()
boolean canRead()
boolean canWrite()
boolean equals(java.lang.Object fileSpec)
true
if the argument is an instance of an IDfFile
and it represents the same file path as this object. If the argument is not
an instance of an IDfFile, this method returns false
.equals
in class java.lang.Object
fileSpec
- another objecttrue
if the argument fileSpec is equal to this one;
false
otherwise.java.lang.String getURI() throws DfException
DfException
void setMacResourcePath(java.lang.String macFilePath)
macFilePath
- java.lang.String getMacResourcePath()
Copyright 1994-2023 OpenText Corporation. All rights reserved.