Stay organized with collections
Save and categorize content based on your preferences.
DirectoryNotEmptyException
open class DirectoryNotEmptyException : FileSystemException
Checked exception thrown when a file system operation fails because a directory is not empty.
Summary
Public constructors |
Constructs an instance of this class.
|
Public constructors
DirectoryNotEmptyException
DirectoryNotEmptyException(dir: String!)
Constructs an instance of this class.
Parameters |
dir |
String!: a string identifying the directory or null if not known |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DirectoryNotEmptyException\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDirectoryNotEmptyException\n==========================\n\n```\nopen class DirectoryNotEmptyException : FileSystemException\n```\n\n|---|---|---|---|---|-----------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) |||||\n| | ↳ | [java.lang.Exception](../../lang/Exception.html#) ||||\n| | | ↳ | [java.io.IOException](../../io/IOException.html#) |||\n| | | | ↳ | [java.nio.file.FileSystemException](/reference/kotlin/java/nio/file/FileSystemException) ||\n| | | | | ↳ | [java.nio.file.DirectoryNotEmptyException](#) |\n\nChecked exception thrown when a file system operation fails because a directory is not empty.\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [DirectoryNotEmptyException](#DirectoryNotEmptyException(kotlin.String))`(`dir:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Constructs an instance of this class. |\n\n| Inherited functions ||\n|---|---|\n| From class [FileSystemException](/reference/kotlin/java/nio/file/FileSystemException) |-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getFile](/reference/kotlin/java/nio/file/FileSystemException#getFile())`()` Returns the file used to create this exception. \u003cbr /\u003e | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getOtherFile](/reference/kotlin/java/nio/file/FileSystemException#getOtherFile())`()` Returns the other file used to create this exception. \u003cbr /\u003e | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getReason](/reference/kotlin/java/nio/file/FileSystemException#getReason())`()` Returns the string explaining why the file system operation failed. \u003cbr /\u003e | ||\n\n| Inherited properties ||\n|---|---|\n| From class [FileSystemException](/reference/kotlin/java/nio/file/FileSystemException) |-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | [message](/reference/kotlin/java/nio/file/FileSystemException#message:kotlin.String) Returns the detail message string. \u003cbr /\u003e | ||\n\nPublic constructors\n-------------------\n\n### DirectoryNotEmptyException\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nDirectoryNotEmptyException(dir: String!)\n```\n\nConstructs an instance of this class.\n\n| Parameters ||\n|-------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| `dir` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: a string identifying the directory or `null` if not known |"]]