@leash/integration-filesystem
v0.1.0
Published
Typed Filesystem integration for Leash
Readme
@leash/integration-filesystem
Typed Filesystem integration for Leash — auto-generated by
leash-codegen.
Installation
npm install @leash/integration-filesystemRequires @leash/sdk >= 0.2.0 as a peer dependency.
Usage
import { LeashIntegrations } from '@leash/sdk/integrations'
import { createFilesystemClient } from '@leash/integration-filesystem'
const leash = new LeashIntegrations({ apiKey: process.env.LEASH_API_KEY! })
const filesystem = createFilesystemClient(leash)
// Example: call readFile
const result = await filesystem.readFile({ path: '...', tail: 0, head: 0 })Available Methods
readFile(params)— Read the complete contents of a file as text. DEPRECATED: Use read_text_file...readTextFile(params)— Read the complete contents of a file from the file system as text. Handles va...readMediaFile(params)— Read an image or audio file. Returns the base64 encoded data and MIME type. O...readMultipleFiles(params)— Read the contents of multiple files simultaneously. This is more efficient th...writeFile(params)— Create a new file or completely overwrite an existing file with new content....editFile(params)— Make line-based edits to a text file. Each edit replaces exact line sequences...createDirectory(params)— Create a new directory or ensure a directory exists. Can create multiple nest...listDirectory(params)— Get a detailed listing of all files and directories in a specified path. Resu...listDirectoryWithSizes(params)— Get a detailed listing of all files and directories in a specified path, incl...directoryTree(params)— Get a recursive tree view of files and directories as a JSON structure. Each...moveFile(params)— Move or rename files and directories. Can move files between directories and...searchFiles(params)— Recursively search for files and directories matching a pattern. The patterns...getFileInfo(params)— Retrieve detailed metadata about a file or directory. Returns comprehensive i...listAllowedDirectories(params)— Returns the list of directories that this server is allowed to access. Subdir...
License
Apache-2.0
