import type { NobjcObject } from "objc-js";
import type { _NSArray } from "./NSArray.js";
import type { _NSCoder } from "./NSCoder.js";
import type { _NSData } from "./NSData.js";
import type { _NSObject } from "./NSObject.js";
import type { _NSString } from "./NSString.js";
import type { _NSURL } from "./NSURL.js";
export declare class _NSFileHandle extends _NSObject {
    static alloc(): _NSFileHandle;
    static new(): _NSFileHandle;
    init(): _NSFileHandle;
    static fileHandleForReadingAtPath$(path: _NSString): _NSFileHandle | null;
    static fileHandleForWritingAtPath$(path: _NSString): _NSFileHandle | null;
    static fileHandleForUpdatingAtPath$(path: _NSString): _NSFileHandle | null;
    static fileHandleForReadingFromURL$error$(url: _NSURL, error: NobjcObject | null): _NSFileHandle | null;
    static fileHandleForWritingToURL$error$(url: _NSURL, error: NobjcObject | null): _NSFileHandle | null;
    static fileHandleForUpdatingURL$error$(url: _NSURL, error: NobjcObject | null): _NSFileHandle | null;
    static fileHandleWithStandardInput(): _NSFileHandle;
    static fileHandleWithStandardOutput(): _NSFileHandle;
    static fileHandleWithStandardError(): _NSFileHandle;
    static fileHandleWithNullDevice(): _NSFileHandle;
    initWithFileDescriptor$closeOnDealloc$(fd: number, closeopt: boolean): _NSFileHandle;
    initWithCoder$(coder: _NSCoder): _NSFileHandle | null;
    readDataToEndOfFileAndReturnError$(error: NobjcObject | null): _NSData | null;
    readDataUpToLength$error$(length: number, error: NobjcObject | null): _NSData | null;
    writeData$error$(data: _NSData, error: NobjcObject | null): boolean;
    getOffset$error$(offsetInFile: NobjcObject, error: NobjcObject | null): boolean;
    seekToEndReturningOffset$error$(offsetInFile: NobjcObject | null, error: NobjcObject | null): boolean;
    seekToOffset$error$(offset: number, error: NobjcObject | null): boolean;
    truncateAtOffset$error$(offset: number, error: NobjcObject | null): boolean;
    synchronizeAndReturnError$(error: NobjcObject | null): boolean;
    closeAndReturnError$(error: NobjcObject | null): boolean;
    readInBackgroundAndNotifyForModes$(modes: _NSArray | null): void;
    readInBackgroundAndNotify(): void;
    readToEndOfFileInBackgroundAndNotifyForModes$(modes: _NSArray | null): void;
    readToEndOfFileInBackgroundAndNotify(): void;
    acceptConnectionInBackgroundAndNotifyForModes$(modes: _NSArray | null): void;
    acceptConnectionInBackgroundAndNotify(): void;
    waitForDataInBackgroundAndNotifyForModes$(modes: _NSArray | null): void;
    waitForDataInBackgroundAndNotify(): void;
    initWithFileDescriptor$(fd: number): _NSFileHandle;
    /**
     * The API below may throw exceptions and will be deprecated in a future version of the OS. Use their replacements instead.
     * @deprecated readDataToEndOfFileAndReturnError:
     */
    readDataToEndOfFile(): _NSData;
    /** @deprecated readDataUpToLength:error: */
    readDataOfLength$(length: number): _NSData;
    /** @deprecated writeData:error: */
    writeData$(data: _NSData): void;
    /** @deprecated seekToEndReturningOffset:error: */
    seekToEndOfFile(): number;
    /** @deprecated seekToOffset:error: */
    seekToFileOffset$(offset: number): void;
    /** @deprecated truncateAtOffset:error: */
    truncateFileAtOffset$(offset: number): void;
    /** @deprecated synchronizeAndReturnError: */
    synchronizeFile(): void;
    /** @deprecated closeAndReturnError: */
    closeFile(): void;
    availableData(): _NSData;
    readabilityHandler(): ((arg0: _NSFileHandle) => void) | null;
    setReadabilityHandler$(value: ((arg0: _NSFileHandle) => void) | null): void;
    writeabilityHandler(): ((arg0: _NSFileHandle) => void) | null;
    setWriteabilityHandler$(value: ((arg0: _NSFileHandle) => void) | null): void;
    fileDescriptor(): number;
    /** @deprecated getOffset:error: */
    offsetInFile(): number;
}
