Package-level declarations
Types
Checked exception thrown when a file system operation is denied, typically due to a file permission or other access check.
Checked exception thrown when a file system operation is denied, typically due to a file permission or other access check.
Checked exception thrown when an attempt is made to invoke or complete an I/O operation upon something that is closed, or at least closed to that operation. That this exception is thrown does not necessarily imply that implementation is completely closed (for a FileStream, it does). A socket whose write half has been shut down, for example, may still be open for reading.
Checked exception thrown when an attempt is made to invoke or complete an I/O operation upon something that is closed, or at least closed to that operation. That this exception is thrown does not necessarily imply that implementation is completely closed (for a FileStream, it does). A socket whose write half has been shut down, for example, may still be open for reading.
Denotes an api as being delicate. Probably shouldn't use it.
Checked exception thrown when a file system operation fails because a directory is not empty.
Checked exception thrown when a file system operation fails because a directory is not empty.
Checked exception thrown when a file system operation fails because a directory is not empty.
Signals that an end of file or end of stream has been reached unexpectedly during input. This exception is mainly used by data input streams to signal end of stream. Note that many other input operations return a special value on end of stream rather than throwing an exception.
Signals that an end of file or end of stream has been reached unexpectedly during input. This exception is mainly used by data input streams to signal end of stream. Note that many other input operations return a special value on end of stream rather than throwing an exception.
A File which holds the abstract pathname to a location on the filesystem, be it for a regular file, directory, symbolic link, etc.
Checked exception thrown when an attempt is made to create a file or directory and a file of that name already exists.
Checked exception thrown when an attempt is made to create a file or directory and a file of that name already exists.
Signals that an attempt to open the file or directory denoted by a specified pathname has failed due to its non-existence.
Signals that an attempt to open the file or directory denoted by a specified pathname has failed due to its non-existence.
Thrown when a file system operation fails on one or two files. This class is the general class for file system exceptions.
Thrown when a file system operation fails on one or two files. This class is the general class for file system exceptions.
Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.
Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.
Signals that an I/O operation has been interrupted. An InterruptedIOException is thrown to indicate that an input or output transfer has been terminated because the thread performing it was interrupted. The field bytesTransferred indicates how many bytes were successfully transferred before the interruption occurred.
Signals that an I/O operation has been interrupted. An InterruptedIOException is thrown to indicate that an input or output transfer has been terminated because the thread performing it was interrupted. The field bytesTransferred indicates how many bytes were successfully transferred before the interruption occurred.
Signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.
Signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.
Checked exception thrown when a file system operation, intended for a directory, fails because the file is not a directory.
Checked exception thrown when a file system operation, intended for a directory, fails because the file is not a directory.
Checked exception thrown when a file system operation, intended for a directory, fails because the file is not a directory.
Properties
Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.
Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.
Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.
Attempts to retrieve the code
from an exception thrown from JavaScript. If unable to retrieve it, null
is returned.
Attempts to retrieve the code
from an exception thrown from JavaScript. If unable to retrieve it, null
is returned.
Attempts to retrieve the code
from an exception thrown from JavaScript. If unable to retrieve it, null
is returned.
The path parent.
The operating system's PATH
environment variable (and others such as LD_LIBRARY_PATH
, etc.) delimiter character.
The system's temporary directory.
Functions
If this abstract pathname is already absolute, then the pathname File is simply returned.
If this abstract pathname is already absolute, then the pathname string is simply returned.
Writes the full contents of array to the file. If the file exists, all new data will be appended to the end of the file.
Writes the full contents of text to the file. If the file exists, all new text will be appended to the end of the file.
A canonical pathname is both absolute and unique. The precise definition of canonical form is system-dependent.
A canonical pathname is both absolute and unique. The precise definition of canonical form is system-dependent.
Converts platform.posix.errno to a string (e.g. ENOENT "ENOENT"
) as a prefix for the human-readable error message retrieved via strerror and returns it as an IOException. When platform.posix.errno is ENOENT, then this function will return FileNotFoundException. When platform.posix.errno is EINTR, then this function will return InterruptedIOException.
Helper for Buffer.readInt8
Helper for calling externally defined code in order to propagate a proper JS Error. On Kotlin/Js this simply calls block, but on Kotlin/WasmJs block is wrapped in a function call and run from Js within its own try/catch block. If an Error was caught, it is returned to Kotlin code, converted to Throwable, and then thrown.
Helper for calling externally defined code in order to propagate a proper JS Error. On Kotlin/Js this simply calls block, but on Kotlin/WasmJs block is wrapped in a function call and run from Js within its own try/catch block. If an Error was caught, it is returned to Kotlin code, converted to Throwable, and then thrown.
Helper for calling externally defined code in order to propagate a proper JS Error. On Kotlin/Js this simply calls block, but on Kotlin/WasmJs block is wrapped in a function call and run from Js within its own try/catch block. If an Error was caught, it is returned to Kotlin code, converted to Throwable, and then thrown.
Retrieves the human-readable message for GetLastError via FormatMessageA and returns it as an IOException. When the last error is ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND, then this function will return FileNotFoundException. When the last error is ERROR_OPERATION_ABORTED, then this function will return InterruptedIOException. When the last error is ERROR_HANDLE_EOF, then this function returns EOFException.
Retrieves the human-readable message for GetLastError via FormatMessageA and returns it as an IOException. When the last error is ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND, then this function will return FileNotFoundException.
Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories. In this event the implementation is such that it attempts to "clean up" any parent directories that it created, before throwing its exception.
Opens a File for write operations, appending all new data to the end of the file.
Opens a File for read operations.
Opens a File for read/write operations. The File is not truncated if it already exists, and the initial FileStream.position is 0
.
Helper for Buffer.writeInt8
Converts the throwable to an IOException if it is not already one. When errorCodeOrNull is ENOENT
, then this function will return FileNotFoundException. When the errorCodeOrNull is EINTR
, then this function will return InterruptedIOException. When the errorCodeOrNull starts with ERR_FS_
, then this function will return FileSystemException.
Ensures that the throwable is an instance of IOException. If it is not, it will encase it in one. If the throwable is an instance of InterruptedException, this function returns an InterruptedIOException with the InterruptedException as a suppressed exception.
Ensures that the throwable is an instance of IOException. If it is not, it will encase it in one with the provided lazyMessage. If the throwable is an instance of InterruptedException, this function returns an InterruptedIOException with the InterruptedException as a suppressed exception.
Writes the full contents of array to the file.