🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@bleed-believer/mnt

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bleed-believer/mnt

Manage partitions in linux.

latest
Source
npmnpm
Version
0.0.9-alpha.0
Version published
Weekly downloads
3
-84.21%
Maintainers
1
Weekly downloads
 
Created
Source

@bleed-believer/mnt

Manage partitions in linux.

Disclaimer

Since ESM hs been heavely adopted by the whole node.js community (including transpilers, unit testing, and many other libraries), the CJS support has been removed. If you still needs the CJS compatibility, please use this version or earlier.

Installation

Simply use:

npm i --save @bleed-believer/mnt

Usage

  • Gets all mounted resources:

    import { Resource } from '@bleed-believer/mnt';
    
    const resources = await Resource.get();
    console.log(resources);
    
  • Gets an specific resource:

    import { Resource } from '@bleed-believer/mnt';
    
    const resource = await Resource.find(x => x.target === '/mnt/z');
    console.log(resource);
    
  • Checks if the resource is mounted:

    import { Resource } from '@bleed-believer/mnt';
    
    const resp = await Resource.some(x => x.target === '/mnt/z');
    console.log('exists???', resp);
    
  • Filtering some devices:

    import { Resource } from '@bleed-believer/mnt';
    
    const resources = await Resource.filter(x => x.fstype === 'ext4');
    console.log(resources);
    
  • Mounting a resource listed in /etc/fstab:

    import { Resource } from '@bleed-believer/mnt';
    
    const obj = await Resource.mount('/mnt/z');
    console.log(obj);
    
  • Mounting a new resource:

    import { Resource } from '@bleed-believer/mnt';
    
    const obj = await Resource.mount({
        fstype: 'ntfs',
        source: '/dev/sdb2',
        target: '/mnt/z'
    });
    console.log(obj);
    
  • Unmounting a resource:

    import { Resource } from '@bleed-believer/mnt';
    
    // Using only the target folder (listed in /etc/fstab)...
    await Resource.umount('/mnt/z');
    
    // ...or usinig an instance
    const obj = await Resource.find(x => x.target === '/mnt/z');
    await obj.umount();
    

Keywords

meta

FAQs

Package last updated on 10 Apr 2026

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