Checks if there are enough space in a specified path.

Overview

@planetarium/check-free-space

This package uses native OS APIs to get free size available on specified path. It is powered by fs2 under the hood.

APIs

getFreeSpace

import { getFreeSpace } from '@planetarium/check-free-space';

getFreeSpace('./')

Gets free space available on specified path. It returns BigInt.

checkFreeSpace

import { checkFreeSpace } from '@planetarium/check-free-space';

if (checkFreeSpace('./', BigInt(1_000_000_000_000))) {
  console.log('Enough space available');
}

Checks if there are enough space to store specified amount of bytes in a specified path. You can provide a BigInt, string, or number value for bytes.

If you passed a string as bytes, it may throw if the string cannot be parsed as numerical value. If BigInt is passed, it will be converted to Rust u64 during the process.

You might also like...
Assure that your tests are there, and well written.
Assure that your tests are there, and well written.

cargo-is-tested [ 🇪🇸 ] El libro contiene instrucciones e información detallada en Español. cargo-is-tested is a way to check which of your items are

Crash recovery for Darktide. There's heresy to be smote and no time to waste.
Crash recovery for Darktide. There's heresy to be smote and no time to waste.

Darktide Rebooter 🥾 ↪️ 🥾 Automatically boot the game up again (and bypass the launcher) immediately after a crash. There's heresy to be smote and no

A small game about solving a mystery aboard a train... if there even is one
A small game about solving a mystery aboard a train... if there even is one

Train Mystery A small game about solving a mystery aboard a train... if there even is one. 🎉 Jeu d'enquête gagnant du Palm'Hackaton 2023. 🎉 A propos

Utility for barcoderdev/unitypackage_godot, submit issues there.

unitypackage_util Requires barcoderdev/FBX2glTF to extract FBX in GLTF(glb) format. Place the binary in the same folder, or in PATH. Usage: unitypacka

🧑🏻‍⚕️ Command-line utility which poll on remote addresses in order to perform status checks periodically

ナース (Nāsu) 🧑🏻‍⚕️ Command-line utility which poll on remote addresses in order to perform status checks periodically Motivation Nāsu (from Japanese ナ

A simple scanner that loops through ips and checks if a minecraft server is running on port 25565

scanolotl Scanolotl is a simple scanner that loops through ips and checks if a minecraft server is running on port 25565. Scanolotl can also preform a

🕶 Assorted checks and validations for writing safer Solana programs.
🕶 Assorted checks and validations for writing safer Solana programs.

vipers 😎 Assorted checks and validations for writing safer Solana programs. Motivation Solana's fee mechanism is unlike Ethereum's, in that the numbe

Checks your files for existence of Unicode BIDI characters which can be misused for supply chain attacks. See CVE-2021-42574

BIDI Character Detector This tool checks your files for existence of Unicode BIDI characters which can be misused for supply chain attacks to mitigate

Checks Neos VR sessions to see if they're up

Checks Neos VR sessions to see if they're up

Automated license checking for rust. cargo lichking is a Cargo subcommand that checks licensing information for dependencies.

cargo-lichking Automated license checking for rust. cargo lichking is a Cargo subcommand that checks licensing information for dependencies. Liches ar

A small monitoring process that checks if kstars is active, if not it sends a request to notify a user via telegram that it crashed

Astro monitor A small monitoring process that checks if kstars is active, if not it sends a request to notify a user via telegram that it crashed Inst

Checks all your documentation for spelling and grammar mistakes with hunspell and a nlprule based checker for grammar

cargo-spellcheck Check your spelling with hunspell and/or nlprule. Use Cases Run cargo spellcheck --fix or cargo spellcheck fix to fix all your docume

Checks whether the process is running as root/sudo/admin permission in Windows and Unix systems

Is_sudo Checks if program is running as sudo in unix systems, or using admin permission in windows. Usage use is_sudo::check; use is_sudo::RunningAs;

Checks Crusader Kings 3 user mod files for common mistakes and warns about them.

ck3-tiger Pounces on bugs. Checks Crusader Kings 3 user mod files for common mistakes and warns about them. For example: missing localizations, or usi

Trento checks' ecosystem linting tool

Rashomon Validation engine for Trento Checks DSL. Usage $ tlint -h tlint 0.9.0 USAGE: tlint [OPTIONS] OPTIONS: -f, --file FILE -h,

Recipes for avoiding bounds checks in Rust, without unsafe!

Recipes for avoiding bounds checks in Rust This repository showcases various approaches to avoiding bounds checks in Rust code, without unsafe code. E

An implementation of Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve

tiny-keccak An implementation of Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve. Documentation The Keccak-f[1600] permut

This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you specified.

prae This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you spec

Lists Steam applications that have specified a Steam Play compatibility tool

proton-usage Lists Steam applications that have specified a Steam Play compatibility tool. Useful for when you want to remove/uninstall unused compati

Owner
Planetarium
We bring freedom and moddability to massively multiplayer online games with decentralization and open source technology.
Planetarium
CLI utility to move (or rename) your files to a new location and redirect all of its symbolic links, to the new path

Move Links CLI utility to move (or rename) your files to a new location and redirect all of its symbolic links, to the new path (or name). Usage execu

Ben Mefteh 18 May 22, 2022
Terminal disk space navigator 🔭

diskonaut How does it work? Given a path on your hard-drive (which could also be the root path, eg. /). diskonaut scans it and indexes its metadata to

Aram Drevekenin 1.6k Dec 30, 2022
Save disk space by cleaning non-essential files from software projects.

Kondo ?? Cleans unneeded directories and files from your system. It will identify the disk space savings you would get from deleting temporary/unneces

Trent 920 Dec 27, 2022
What if there's something important in there?

wateor What is this? This command line tool will collect all the untracked files in your repo, create a bzip2-compressed tar file from them, encrypt t

Paul Sanford 10 Dec 6, 2022
Auritia is a DAW coded in Rust and Vue in hopes of having cross platform compatability, while also providing enough features for anyone to use professionally

Steps Install WebView if you're not on Windows 11 Install Node deps npm i To run the dev server do npm run tauri dev Compiling Linux You will need to

Auritia 20 Aug 27, 2022
Build tool for custom setups of docker containers. Docker compose didn't offer enough, Kubernetes offered too much. Carbon is the in-between.

docker abstraction layer with added flair Fast travel: Tips Contributing How it works Installation Help This tool started its life as a way to make de

akhara 3 Nov 10, 2022
A pastebin that does just enough to be really useful.

Rocket Powered Pastebin (rktpb | paste.rs) A pastebin that does just enough to be really useful. Really fast, really lightweight. Renders markdown lik

Sergio Benitez 8 Nov 29, 2023
The best Intermediate Rust course out there!

Ultimate Rust 2: Intermediate Concepts This is the companion repository for the Ultimate Rust 2: Intermediate Concepts (the followup to the popular Ul

Nathan Stocks 155 Jan 4, 2023
A tetris game I wrote in rust using ncurses. I'm sure that there's a better way to write a tetris game, and the code may be sus, but it techinically works

rustetris A tetris game I wrote in rust using ncurses. I'm sure that there's a better way to write a tetris game, and the code may be sus, but it tech

Eric G 3 Oct 15, 2022
🐎 Just a simple cross-platform neofetch for all the bronies out there.

⚠️ (WIP) This project is not ready for any serious use right now. A cross-platform command-line interface (CLI) tool written in Rust to display system

Jakub 4 Dec 15, 2022