New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@uipath/filesystem

Package Overview
Dependencies
Maintainers
17
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
This package has malicious versions linked to the ongoing "Mini Shai-Hulud" supply chain attack.

Affected versions:

1.0.1
View campaign page

@uipath/filesystem

Cross-platform filesystem abstraction for the UiPath CLI. Provides a unified interface for file operations in both Node.js and browser environments.

Source
npmnpm
Version
0.1.7
Version published
Weekly downloads
3.4K
726.34%
Maintainers
17
Weekly downloads
 
Created
Source

@uipath/filesystem

Cross-platform filesystem abstraction for the UiPath CLI. Provides a unified interface for file operations in both Node.js and browser environments.

Installation

npm install @uipath/filesystem

Usage

import { getFileSystem } from "@uipath/filesystem";

const fs = getFileSystem();

// Read a file
const content = await fs.readFile("config.json", "utf-8");

// Write a file (creates directories as needed)
await fs.writeFile("output/result.json", JSON.stringify(data));

// Path operations
const full = fs.path.join(fs.env.homedir(), ".uipath", "config.json");

// Check existence
if (await fs.exists(full)) {
    const stats = await fs.stat(full);
}

API

getFileSystem() / getFileSystemAsync()

Returns a singleton IFileSystem instance.

IFileSystem

MethodDescription
readFile(path, options?)Read file as Uint8Array or UTF-8 string
writeFile(path, data)Write file, creating parent directories
readdir(path)List directory contents
stat(path)Get file stats (type, size, mtime)
exists(path)Check if path exists
mkdir(path)Create directory recursively
rm(path)Remove file or directory recursively
rename(old, new)Rename or move a file
getTempDir()Create an isolated temp directory
copyDirectory(src, dest)Recursive directory copy

Namespaces

NamespaceDescription
fs.pathPath operations: join, resolve, relative, dirname, basename, isAbsolute
fs.envEnvironment: cwd(), homedir(), tmpdir(), getenv(key)

License

See the root repository for license information.

FAQs

Package last updated on 02 Apr 2026

Related posts