Open ClassFoundation5.9.0
FileHandle
class FileHandle
Superclasses
class NSObject
The root class of most Foundation class hierarchies.
Citizens in Foundation
Conformances
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol NSObjectProtocol
The
NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
Members
convenience init(fileDescriptor: Int32
) init(fileDescriptor: Int32, closeOnDealloc: Bool
) convenience init?(forReadingAtPath: String
) convenience init(forReadingFrom: URL
) throws convenience init(forUpdating: URL
) throws convenience init?(forUpdatingAtPath: String
) convenience init?(forWritingAtPath: String
) convenience init(forWritingTo: URL
) throws static let readCompletionNotification: Notification.Name
class var nullDevice: FileHandle
class var standardError: FileHandle
class var standardInput: FileHandle
class var standardOutput: FileHandle
var availableData: Data
var fileDescriptor: Int32
var readabilityHandler: ((FileHandle) -> Void)?
var writeabilityHandler: ((FileHandle) -> Void)?
func acceptConnectionInBackgroundAndNotify(
) func acceptConnectionInBackgroundAndNotify(forModes: [RunLoop.Mode]?
) func close(
) throws func offset(
) throws -> UInt64 func read(upToCount: Int
) throws -> Data? func readInBackgroundAndNotify(
) func readInBackgroundAndNotify(forModes: [RunLoop.Mode]?
) func readToEnd(
) throws -> Data? func readToEndOfFileInBackgroundAndNotify(
) func readToEndOfFileInBackgroundAndNotify(forModes: [RunLoop.Mode]?
) func seek(toOffset: UInt64
) throws func seekToEnd(
) throws -> UInt64 func synchronize(
) throws func truncate(atOffset: UInt64
) throws func waitForDataInBackgroundAndNotify(
) func waitForDataInBackgroundAndNotify(forModes: [RunLoop.Mode]?
) func write<T>(contentsOf: T
) throws var offsetInFile: UInt64
func closeFile(
) func readData(ofLength: Int
) -> Data func readDataToEndOfFile(
) -> Data func seek(toFileOffset: UInt64
) func seekToEndOfFile(
) -> UInt64 func synchronizeFile(
) func truncateFile(atOffset: UInt64
) func write(Data
)