@StableMinor(version="7.1", sinceVersion="4.1") public class PortalFile extends File
Extends the File
, embedding the raising of events and portal cluster
replication.
pathSeparator, pathSeparatorChar, separator, separatorChar
Constructor and Description |
---|
PortalFile(File file) |
PortalFile(File parent,
String child)
Creates a new portal file from a parent file and a child pathname
string.
|
PortalFile(PortalFilePath portalFilePath) |
PortalFile(String pathname) |
PortalFile(String parent,
String child) |
Modifier and Type | Method and Description |
---|---|
boolean |
createNewFile() |
boolean |
delete() |
void |
deleteOnExit() |
PortalFile |
getParentPortalFile()
Returns the PortalFile that is parent of this one.
|
PortalFilePath |
getPortalFilePath()
Returns the path for this portal file.
|
boolean |
mkdir() |
boolean |
mkdirs() |
void |
recursiveDelete()
Recursively deletes this file and any child of it.
|
boolean |
renameTo(File dest) |
boolean |
setLastModified(long time) |
boolean |
setReadOnly() |
String |
toString() |
canExecute, canRead, canWrite, compareTo, createTempFile, createTempFile, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, setExecutable, setExecutable, setReadable, setReadable, setWritable, setWritable, toPath, toURI, toURL
public PortalFile(PortalFilePath portalFilePath)
public PortalFile(File file)
public PortalFile(File parent, String child)
If the parent file is an instance of a portal file, the result portal file will
have the same PortalBaseFolder
, but
adds the child
string to the parent's relative path. The
resulting relative path must be valid and still reside inside the same
PortalBaseFolder
.
Example:
If parent
has base folder DATA
and relative path "/path"
,
and child
is "child.txt"
, the resulting portal file will have
base folder DATA
and relative path "/path/child.txt"
.
parent
- the parent file.child
- the child pathname string.NullPointerException
- if parent
or child
is
null
.public PortalFile(String pathname)
public PortalFilePath getPortalFilePath()
public PortalFile getParentPortalFile()
null
is returned;public void recursiveDelete()
public boolean createNewFile() throws IOException
createNewFile
in class File
IOException
public void deleteOnExit()
deleteOnExit
in class File
public boolean setLastModified(long time)
setLastModified
in class File
public boolean setReadOnly()
setReadOnly
in class File
Lumisportal 7.1.1.140331 - Copyright © 2006–2014 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.