Files

object Files

port of java.nio.file.Files

Functions

Link copied to clipboard
fun createDirectories(path: Path)
Link copied to clipboard
fun createDirectory(path: Path)
Link copied to clipboard
fun createFile(path: Path)
Link copied to clipboard
fun creationTime(path: Path): Long?
Link copied to clipboard
fun delete(path: Path)
Link copied to clipboard
fun getFileSystem(): FileSystem
fun getFileSystem(path: Path): FileSystem
Link copied to clipboard
fun isDirectory(path: Path): Boolean
Link copied to clipboard
fun move(source: Path, target: Path, vararg options: StandardCopyOption)
Link copied to clipboard
fun newBufferedReader(path: Path, charset: Charset): BufferedReader
Link copied to clipboard
fun newBufferedWriter(path: Path, charset: Charset): BufferedWriter
Link copied to clipboard
fun newDirectoryStream(path: Path): Sequence<Path>
fun newDirectoryStream(path: Path, glob: String): Sequence<Path>
Link copied to clipboard
fun newInputStream(path: Path): InputStream
Link copied to clipboard
fun newOutputStream(path: Path): OutputStream
fun newOutputStream(path: Path, vararg options: OpenOption): OutputStream
Link copied to clipboard
fun openReadOnlyFileHandle(path: Path): FileHandle
Link copied to clipboard
fun readAttributes(path: Path): FileMetadata
Link copied to clipboard
fun registerFileSystem(path: Path, fileSystem: FileSystem)
Link copied to clipboard

Resets the file system provider to the default (SystemFileSystem).

Link copied to clipboard
fun setFileSystem(fileSystem: FileSystem)

Sets the file system provider to use for file operations. This is primarily used for testing to avoid accessing the actual file system.

Link copied to clipboard
fun size(path: Path): Long