Class AbstractFileSystemItemAccessor
java.lang.Object
ch.nolix.base.environment.filesystem.AbstractFileSystemItemAccessor
- Direct Known Subclasses:
FileAccessor, FileSystemItemAccessor, FolderAccessor
A file system item accessor can access a given file system item. A file
system item is a file or a folder.
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionfinal Stringfinal StringgetName()final FolderAccessorfinal StringgetPath()final longfinal booleanhasExtension(String extension) final booleanisFile()final booleanisFolder()
-
Method Details
-
getExtension
- Returns:
- the extension of the name of the file system item of the current
AbstractFileSystemItemAccessor.
-
getName
- Returns:
- the name of the file system item of the current
AbstractFileSystemItemAccessor.
-
getParentFolderAccessor
- Returns:
- a new folder accessor to the parent folder of the file system item of this file system item accessor.
-
getPath
- Returns:
- the path of the file system item of this file system item accessor.
-
hasExtension
- Parameters:
extension-- Returns:
- true if the file system item of the current
AbstractFileSystemItemAccessorhas the given extension, false otherwise
-
getSizeInBytes
public final long getSizeInBytes()- Returns:
- the size of the file system item of this file system item accessor in bytes.
-
isFile
public final boolean isFile()- Returns:
- true if the file system item is a file in the file system on the local machine, false otherwise
-
isFolder
public final boolean isFolder()- Returns:
- true if this path is a folder in the file system on the local machine, false otherwise
-