FileSystemException

Platform and version requirements: JVM (1.0)
open class FileSystemException : IOException

A base exception class for file system exceptions.

Constructors

Platform and version requirements: JVM (1.0)

<init>

A base exception class for file system exceptions.

FileSystemException(
    file: File, 
    other: File? = null, 
    reason: String? = null)

Properties

Platform and version requirements: JVM (1.0)

file

the file on which the failed operation was performed.

val file: File
Platform and version requirements: JVM (1.0)

other

the second file involved in the operation, if any (for example, the target of a copy or move)

val other: File?
Platform and version requirements: JVM (1.0)

reason

the description of the error

val reason: String?

Extension Properties

Platform and version requirements: JVM (1.0)

stackTrace

Returns an array of stack trace elements representing the stack trace pertaining to this throwable.

val Throwable.stackTrace: Array<StackTraceElement>

Extension Functions

Platform and version requirements: JVM (1.0)

printStackTrace

Prints the detailed description of this throwable to the specified writer.

fun Throwable.printStackTrace(writer: PrintWriter)

Prints the detailed description of this throwable to the specified stream.

fun Throwable.printStackTrace(stream: PrintStream)

Inheritors

Platform and version requirements: JVM (1.0)

AccessDeniedException

An exception class which is used when we have not enough access for some operation.

class AccessDeniedException : FileSystemException
Platform and version requirements: JVM (1.0)

FileAlreadyExistsException

An exception class which is used when some file to create or copy to already exists.

class FileAlreadyExistsException : FileSystemException
Platform and version requirements: JVM (1.0)

NoSuchFileException

An exception class which is used when file to copy does not exist.

class NoSuchFileException : FileSystemException

© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/-file-system-exception/index.html