Package lumis.portal.filesystem
Class PortalFile
- java.lang.Object
-
- java.io.File
-
- lumis.portal.filesystem.PortalFile
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<java.io.File>
@Deprecated public class PortalFile extends java.io.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$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PortalFile(java.io.File file)
Deprecated.PortalFile(java.io.File parent, java.lang.String child)
Deprecated.PortalFile(java.lang.String pathname)
Deprecated.PortalFile(java.lang.String parent, java.lang.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(java.io.File dest)
Deprecated.boolean
setLastModified(long time)
Deprecated.boolean
setReadOnly()
Deprecated.java.lang.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(java.io.File file)
Deprecated.
-
PortalFile
@Deprecated public PortalFile(java.io.File parent, java.lang.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:
java.lang.NullPointerException
- ifparent
orchild
isnull
.- Since:
- 6.2.0
-
PortalFile
@Deprecated public PortalFile(java.lang.String parent, java.lang.String child)
Deprecated.
-
PortalFile
@Deprecated public PortalFile(java.lang.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 java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.io.File
-
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 java.io.IOException
Deprecated.- Overrides:
createNewFile
in classjava.io.File
- Throws:
java.io.IOException
-
delete
@Deprecated public boolean delete()
Deprecated.- Overrides:
delete
in classjava.io.File
-
deleteOnExit
@Deprecated public void deleteOnExit()
Deprecated.- Overrides:
deleteOnExit
in classjava.io.File
-
mkdir
@Deprecated public boolean mkdir()
Deprecated.- Overrides:
mkdir
in classjava.io.File
-
mkdirs
@Deprecated public boolean mkdirs()
Deprecated.- Overrides:
mkdirs
in classjava.io.File
-
renameTo
@Deprecated public boolean renameTo(java.io.File dest)
Deprecated.- Overrides:
renameTo
in classjava.io.File
-
setLastModified
@Deprecated public boolean setLastModified(long time)
Deprecated.- Overrides:
setLastModified
in classjava.io.File
-
setReadOnly
@Deprecated public boolean setReadOnly()
Deprecated.- Overrides:
setReadOnly
in classjava.io.File
-
-