/// <reference types="node" />
/**
 * @typed/fp/node is a place to place implementations of environment from other modules that require or
 * are best used with implementations specifically for node.js.
 * @since 0.9.4
 */
import * as Ei from 'fp-ts/Either';
import * as fs from 'fs';
import { HistoryEnv, LocationEnv } from './dom';
import * as E from './Env';
import * as http from './http';
/**
 * @category Environment
 * @since 0.9.4
 */
export declare const HttpEnv: http.HttpEnv;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const chmod: (path: fs.PathLike, mode: fs.Mode) => E.Env<unknown, Ei.Either<unknown, void>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const copyFile: (src: fs.PathLike, dest: fs.PathLike, flags?: number | undefined) => E.Env<unknown, Ei.Either<unknown, void>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const link: (existingPath: fs.PathLike, newPath: fs.PathLike) => E.Env<unknown, Ei.Either<unknown, void>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const mkdir: (path: fs.PathLike, options?: fs.Mode | fs.MakeDirectoryOptions | null | undefined) => E.Env<unknown, Ei.Either<unknown, string | undefined>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const read: <TBuffer extends Uint8Array>(handle: fs.promises.FileHandle, buffer: TBuffer, offset?: number | null | undefined, length?: number | null | undefined, position?: number | null | undefined) => E.Env<unknown, Ei.Either<unknown, {
    bytesRead: number;
    buffer: TBuffer;
}>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const readFile: (path: fs.PathLike | fs.promises.FileHandle, options?: BufferEncoding | (fs.BaseEncodingOptions & import("events").Abortable & {
    flag?: fs.OpenMode | undefined;
}) | null | undefined) => E.Env<unknown, Ei.Either<unknown, string | Buffer>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const readdir: (path: fs.PathLike, options: fs.BaseEncodingOptions & {
    withFileTypes: true;
}) => E.Env<unknown, Ei.Either<unknown, fs.Dirent[]>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const rm: (path: fs.PathLike, options?: fs.RmOptions | undefined) => E.Env<unknown, Ei.Either<unknown, void>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const rmdir: (path: fs.PathLike, options?: fs.RmDirOptions | undefined) => E.Env<unknown, Ei.Either<unknown, void>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const stat: (path: fs.PathLike, opts?: fs.StatOptions | undefined) => E.Env<unknown, Ei.Either<unknown, fs.Stats | fs.BigIntStats>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const symlink: (target: fs.PathLike, path: fs.PathLike, type?: string | null | undefined) => E.Env<unknown, Ei.Either<unknown, void>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const unlink: (path: fs.PathLike) => E.Env<unknown, Ei.Either<unknown, void>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const write: (handle: fs.promises.FileHandle, string: string, position?: number | null | undefined, encoding?: BufferEncoding | null | undefined) => E.Env<unknown, Ei.Either<unknown, {
    bytesWritten: number;
    buffer: string;
}>>;
/**
 * @category FS
 * @since 0.13.1
 */
export declare const writeFile: (path: fs.PathLike | fs.promises.FileHandle, data: string | Uint8Array, options?: BufferEncoding | (fs.BaseEncodingOptions & {
    mode?: fs.Mode | undefined;
    flag?: fs.OpenMode | undefined;
} & import("events").Abortable) | null | undefined) => E.Env<unknown, Ei.Either<unknown, void>>;
/**
 * ParsedHref JSON data structure
 * @name ParsedHref
 * @category Model
 * @since 0.13.2
 */
export declare type ParsedHref = {
    readonly href: string;
    readonly protocol: string;
    readonly host: string;
    readonly userInfo: string;
    readonly username: string;
    readonly password: string;
    readonly hostname: string;
    readonly port: string;
    readonly relative: string;
    readonly pathname: string;
    readonly directory: string;
    readonly file: string;
    readonly search: string;
    readonly hash: string;
};
/**
 * Parses an href into JSON.
 * @category Parser
 * @since 0.13.2
 * */
export declare function parseHref(href: string): ParsedHref;
/**
 * Create A History Environment that works in browser and non-browser environments
 * @param href :: initial href to use
 * @category Environment
 * @since 0.13.2
 */
export declare function createHistoryEnv(href?: string): HistoryEnv & LocationEnv;
//# sourceMappingURL=node.d.ts.map