Package org.codelibs.fess.storage
Class StorageItem
java.lang.Object
org.codelibs.fess.storage.StorageItem
Represents a storage item (file or directory).
-
Constructor Summary
ConstructorsConstructorDescriptionStorageItem(String name, String path, boolean directory, long size, ZonedDateTime lastModified, String encodedId) Creates a new StorageItem instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the base64-encoded ID of the item.Returns the last modified timestamp.getName()Returns the name of the item.getPath()Returns the path of the item.longgetSize()Returns the size of the item in bytes.booleanReturns whether this item is a directory.
-
Constructor Details
-
StorageItem
public StorageItem(String name, String path, boolean directory, long size, ZonedDateTime lastModified, String encodedId) Creates a new StorageItem instance.- Parameters:
name- the name of the itempath- the path of the itemdirectory- true if this item is a directorysize- the size of the item in byteslastModified- the last modified timestampencodedId- the base64-encoded ID of the item
-
-
Method Details
-
getName
Returns the name of the item.- Returns:
- the item name
-
getPath
Returns the path of the item.- Returns:
- the item path
-
isDirectory
public boolean isDirectory()Returns whether this item is a directory.- Returns:
- true if this item is a directory, false otherwise
-
getSize
public long getSize()Returns the size of the item in bytes.- Returns:
- the item size
-
getLastModified
Returns the last modified timestamp.- Returns:
- the last modified timestamp
-
getEncodedId
Returns the base64-encoded ID of the item.- Returns:
- the encoded ID
-