Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/diskspace

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/diskspace

TypeScript definitions for diskspace

  • 2.0.4
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/diskspace

Summary

This package contains type definitions for diskspace (https://github.com/keverw/diskspace.js).

Details

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

index.d.ts

/**
 * @param err RU: Ошибка при выполнении  EN: Runtime error
 * @param result RU: Результат проверки дискового пространства   EN: The result of the diskspace check
 */
export type Callback = (err: Error | null, result: Result) => void;

export interface Result {
    /**
     * RU: Это то, сколько диск имеет полностью.
     *
     * EN: Is how much the drive has totally.
     */
    total: string;
    /**
     * RU:
     *
     * Это указанная часть диска как используемая.
     * На *nix это прямо из команды, в Windows это вычисляется из `df -kresult.total - result.free`
     *
     * EN:
     *
     * Is how much of the drive is reported as used.
     * On *nix this is straight from the command, on Windows it's calculated from `df -kresult.total - result.free`
     */
    used: number;
    /**
     * RU: Это то, сколько свободного места у вас есть.
     *
     * EN: Is how much free space you have.
     */
    free: string;
    /**
     * RU:
     *
     * На самом деле не так полезен, если вы не хотите отлаживать.
     * * NOTFOUND - Диск не найден, значения пространства будут 0
     * * READY - Диск готов
     * * NOTREADY - Диск не готов, значения пространства будут 0
     * * STDERR - некоторая ошибка, вывод ее был записан на консоль.
     *
     * EN:
     *
     * Isn't really that useful unless you want to debug.
     * * NOTFOUND - Disk was not found, the space values will be 0
     * * READY - The drive is ready
     * * NOTREADY - The drive isn't ready, the space values will be 0
     * * STDERR - some error, the output of it was logged to the console.
     */
    status: "NOTFOUND" | "READY" | "NOTREADY" | "STDERR";
}

/**
 * RU:
 *
 * В Windows вы меняете `C` на букву диска, которую вы хотите проверить. В Linux вы используете путь монтирования, например `/`
 *
 * Примечание: Это не удастся на жестких дисках размером более 9 петабайт.
 *
 * EN:
 *
 *  On Windows you change `C` to the drive letter you want to check. On Linux you use the mount path eg `/`
 *
 * Notes: This will fail on hard drives bigger than 9 petabytes.
 * @param drive RU: Наименование диска  EN: Name disk
 * @param callback RU: Callback-функция EN: Callback-function
 */
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function check<T extends string = "C" | "/">(drive: T, callback: Callback): void;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Vladislav.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc