Package lumis.portal.filesystem
Class PortalFile
- java.lang.Object
-
- java.io.File
-
- lumis.portal.filesystem.PortalFile
-
- All Implemented Interfaces:
Serializable
,Comparable<File>
@Deprecated public class PortalFile extends File
Deprecated.since 8.0.0 it is not recommended to be used anymore due to the filesystem abstraction layer. Every file operation should use theIFile
interface, that can be obtained fromIFileSystemManager.getFile(PortalFilePath)
. The direct usage of Java file API can produce unpredictable portal behavior, when not using the LumisPortal default filesystem implementations. The newfilesystem
API is highly recommended to be used instead.A file that resides inside the portal's controlled file system.Extends the
File
, embedding the raising of events and portal cluster replication.- Since:
- 4.1.0
- Version:
- $Revision: 17047 $ $Date: 2015-03-03 11:22:22 -0300 (Tue, 03 Mar 2015) $
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
-
-
Constructor Summary
Constructors Constructor Description PortalFile(File file)
Deprecated.PortalFile(File parent, String child)
Deprecated.PortalFile(String pathname)
Deprecated.PortalFile(String parent, String child)
Deprecated.PortalFile(PortalFilePath portalFilePath)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
createNewFile()
Deprecated.boolean
delete()
Deprecated.void
deleteOnExit()
Deprecated.PortalFile
getParentPortalFile()
Deprecated.PortalFilePath
getPortalFilePath()
Deprecated.boolean
mkdir()
Deprecated.boolean
mkdirs()
Deprecated.void
recursiveDelete()
Deprecated.boolean
renameTo(File dest)
Deprecated.boolean
setLastModified(long time)
Deprecated.boolean
setReadOnly()
Deprecated.String
toString()
Deprecated.-
Methods inherited from class java.io.File
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
-
-
-
-
Constructor Detail
-
PortalFile
@Deprecated public PortalFile(PortalFilePath portalFilePath)
Deprecated.
-
PortalFile
@Deprecated public PortalFile(File file)
Deprecated.
-
PortalFile
@Deprecated public PortalFile(File parent, String child)
Deprecated.Creates a new portal file from a parent file and a child pathname string.If the parent file is an instance of a portal file, the result portal file will have the same
PortalBaseFolder
, but adds thechild
string to the parent's relative path. The resulting relative path must be valid and still reside inside the samePortalBaseFolder
.Example: If
parent
has base folderDATA
and relative path"/path"
, andchild
is"child.txt"
, the resulting portal file will have base folderDATA
and relative path"/path/child.txt"
.- Parameters:
parent
- the parent file.child
- the child pathname string.- Throws:
NullPointerException
- ifparent
orchild
isnull
.- Since:
- 6.2.0
-
PortalFile
@Deprecated public PortalFile(String parent, String child)
Deprecated.
-
PortalFile
@Deprecated public PortalFile(String pathname)
Deprecated.
-
-
Method Detail
-
getPortalFilePath
@Deprecated public PortalFilePath getPortalFilePath()
Deprecated.Returns the path for this portal file.- Returns:
- the path.
- Since:
- 4.1.0
-
toString
@Deprecated public String toString()
Deprecated.
-
getParentPortalFile
@Deprecated public PortalFile getParentPortalFile()
Deprecated.Returns the PortalFile that is parent of this one. If this file's parent is not a valid PortalFile (because this PortalFile is a relative root),null
is returned;- Returns:
- the PortalFile that is parent of this one, or null if this PortalFile does not have a parent PortalFile.
- Since:
- 4.1.0
-
recursiveDelete
@Deprecated public void recursiveDelete()
Deprecated.Recursively deletes this file and any child of it.- Since:
- 4.1.0
-
createNewFile
@Deprecated public boolean createNewFile() throws IOException
Deprecated.- Overrides:
createNewFile
in classFile
- Throws:
IOException
-
delete
@Deprecated public boolean delete()
Deprecated.
-
deleteOnExit
@Deprecated public void deleteOnExit()
Deprecated.- Overrides:
deleteOnExit
in classFile
-
mkdir
@Deprecated public boolean mkdir()
Deprecated.
-
mkdirs
@Deprecated public boolean mkdirs()
Deprecated.
-
renameTo
@Deprecated public boolean renameTo(File dest)
Deprecated.
-
setLastModified
@Deprecated public boolean setLastModified(long time)
Deprecated.- Overrides:
setLastModified
in classFile
-
setReadOnly
@Deprecated public boolean setReadOnly()
Deprecated.- Overrides:
setReadOnly
in classFile
-
-