Enums
enum OpenMode
public enum OpenMode <: ToString & Equatable<OpenMode> {
| Read
| Write
| Append
| ReadWrite
}
Description: Indicates different file opening modes.
Parent types:
Read
Read
Description: Constructs an OpenMode instance to open a file in read-only mode. If the file does not exist, FSException is thrown.
Write
Write
Description: Constructs an OpenMode instance to open a file in write-only mode. If the file exists, it is truncated to 0 bytes. If the file does not exist, it will be created.
Append
Append
Description: Constructs an OpenMode instance to open a file in appending write mode. If the file does not exist, it will be created.
ReadWrite
ReadWrite
Description: Constructs an OpenMode instance to open a file in read/write mode. If the file does not exist, it will be created.
NOTE
The file is not truncated to 0 bytes in ReadWrite mode.
func toString()
public func toString(): String
Description: Obtains the string representation of a file opening mode.
Returns:
- String: name of the file opening mode
func operator func ==(OpenMode)
public operator func ==(that: OpenMode): Bool
Description: Checks whether OpenMode instances are equal.
Parameters:
Returns:
- Bool: If the instances are equal, true is returned. Otherwise, false is returned.
func operator func !=(OpenMode)
public operator func !=(that: OpenMode): Bool
Description: Checks whether OpenMode instances are not equal.
Parameters:
Returns:
- Bool: If the instances are not equal, true is returned. Otherwise, false is returned.