@types/smb2
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

Installation

npm install --save @types/smb2

Summary

This package contains type definitions for smb2 (https://github.com/bchelli/node-smb2).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/smb2.

index.d.ts

export = SMB2;

interface SMB2Options {
    share: string;

    domain: string;

    username: string;

    password: string;

    port?: number | undefined;

    packetConcurrency?: number | undefined;

    autoCloseTimeout?: number | undefined;
}

interface SMB2ReadFileOptions {
    encoding: string | null;
}

declare class SMB2 {
    constructor(options: SMB2Options);

    close(): void;

    exists(path: string, callback?: (error: unknown, exists: boolean) => void): void;

    rename(oldPath: string, newPath: string, callback?: (error: unknown) => void): void;

    readFile(fileName: string, options?: SMB2ReadFileOptions, callback?: (error: unknown, data: string) => void): void;

    readFile(fileName: string, callback?: (error: unknown, data: string) => void): void;

    writeFile(fileName: string, data: string, options?: SMB2ReadFileOptions, callback?: (error: unknown) => void): void;

    writeFile(fileName: string, data: string, callback?: (error: unknown) => void): void;

    unlink(fileName: string, callback?: (error: unknown) => void): void;

    readdir(dir: string, callback?: (error: unknown, files: string[]) => void): void;

    rmdir(dir: string, callback?: (error: unknown) => void): void;

    mkdir(dir: string, mode: string, callback?: (error: unknown) => void): void;

    mkdir(dir: string, callback?: (error: unknown) => void): void;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Nick Whitlock.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/smb2

Weekly Downloads

531

Version

0.2.4

License

MIT

Unpacked Size

5.25 kB

Total Files

5

Last publish

Collaborators

  • types