interface FileTreeElement
Information about a file in a FileTree.
abstract fun copyTo(output: OutputStream): Unit
Copies the content of this file to an output stream. Generally, calling this method is more performant than calling abstract fun copyTo(target: File): Boolean
Copies this file to the given target file. Does not copy the file if the target is already a copy of this file. |
|
abstract fun getFile(): File
Returns the file being visited. |
|
abstract fun getLastModified(): Long
Returns the last modified time of this file at the time of file traversal. |
|
abstract fun getMode(): Int
Returns the Unix permissions of this file, e.g. |
|
abstract fun getName(): String
Returns the base name of this file. |
|
abstract fun getPath(): String
Returns the path of this file, relative to the root of the containing file tree. Always uses '/' as the hierarchy separator, regardless of platform file separator. Same as calling |
|
abstract fun getRelativePath(): RelativePath
Returns the path of this file, relative to the root of the containing file tree. |
|
abstract fun getSize(): Long
Returns the size of this file at the time of file traversal. |
|
abstract fun isDirectory(): Boolean
Returns true if this element is a directory, or false if this element is a regular file. |
|
abstract fun open(): InputStream
Opens this file as an input stream. Generally, calling this method is more performant than calling |
interface FileCopyDetails : FileTreeElement, ContentFilterable
Provides details about a file or directory about to be copied, and allows some aspects of the destination file to be modified. Using this interface, you can change the destination path of the file, filter the content of the file, or exclude the file from the result entirely. Access to the source file itself after any filters have been added is not a supported operation. |
|
interface FileVisitDetails : FileTreeElement
Provides access to details about a file or directory being visited by a FileVisitor. |