class TemporaryDirectory extends AnyRef
- Alphabetic
- By Inheritance
- TemporaryDirectory
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def add(f: File, options: CopyOption*): File
Adds a file or a directory to this temporary directory by copying it from the source location.
Adds a file or a directory to this temporary directory by copying it from the source location. In case of a directory, the whole tree is copied.
- f
the source location, must be a regular file or a directory
- returns
the target location
- Annotations
- @throws(classOf[IOException])
- Exceptions thrown
IllegalArgumentException
if f is not a regular file or a directoryIllegalStateException
if this object is not in active state
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cleanUp(): Boolean
Removes all files and directories added or created before.
Removes all files and directories added or created before.
The root of this temporary directory itself is not deleted and it remains in "active" state, which means that new files and directories still can be added or created.
- returns
true
if successful,false
otherwise
- Exceptions thrown
IllegalStateException
if this object is not in active state- Note
Can only be successful if no files or directories have been added by bypassing the methods of this object.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def createDir(dir: String): File
Creates a new directory within this temporary directory.
Creates a new directory within this temporary directory.
If the
dir
argument is empty, a unique directory is created.If the
dir
argument denotes a path with elements separated by any characters defined bySeparators
, the whole path is created as necessary, but the last element of the path must not exist before.- returns
the target location
- Annotations
- @throws(classOf[IOException])
- Exceptions thrown
IOException
if the directory cannot be created
- def createFile(file: String): File
Creates a new file within this temporary directory.
Creates a new file within this temporary directory.
If the
file
argument is empty, a unique file is created.If the
file
argument denotes a path with elements separated by any characters defined bySeparators
, the whole path is created as necessary, but the last element (the regular file) must not exist before.- returns
the target location
- Annotations
- @throws(classOf[IOException])
- Exceptions thrown
IOException
if the file cannot be created
- def destroy(): Boolean
Removes all files and directories added before and the root of the temporary directory itself.
Removes all files and directories added before and the root of the temporary directory itself.
Sets this temporary directory to "inactive" state, which means that any subsequent method calls other than
isInActiveState
will throw an illegal-state exception.- returns
true
if successful,false
otherwise
- Exceptions thrown
IllegalStateException
if this object is not in active state- Note
Can only be successful if no files or directories have been added by bypassing the methods of this object.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def isInActiveState: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])