Skip to content

FsAdapter

Defined in: src/core/adapters.ts:175

Adapter interface for filesystem operations

Used primarily for LFS progress tracking via GIT_LFS_PROGRESS.

Methods

createTempFile()

createTempFile(prefix?): Promise<string>

Defined in: src/core/adapters.ts:182

Create a temporary file and return its path

Parameters

prefix?

string

Optional prefix for the temp file name

Returns

Promise<string>

Path to the created temporary file


deleteDirectory()

deleteDirectory(dirPath): Promise<void>

Defined in: src/core/adapters.ts:216

Delete a directory recursively

Parameters

dirPath

string

Path to the directory to delete

Returns

Promise<void>


deleteFile()

deleteFile(filePath): Promise<void>

Defined in: src/core/adapters.ts:209

Delete a file

Parameters

filePath

string

Path to the file to delete

Returns

Promise<void>


exists()

exists(filePath): Promise<boolean>

Defined in: src/core/adapters.ts:224

Check if a file exists

Parameters

filePath

string

Path to check

Returns

Promise<boolean>

Whether the file exists


readFile()?

optional readFile(filePath): Promise<string>

Defined in: src/core/adapters.ts:232

Read a file’s contents

Parameters

filePath

string

Path to the file

Returns

Promise<string>

File contents as string


tail()

tail(options): Promise<void>

Defined in: src/core/adapters.ts:190

Start tailing a file (watching for new lines)

Parameters

options

TailOptions

Tail options

Returns

Promise<void>

Promise that resolves when tailing stops


tailStreaming()?

optional tailStreaming(filePath, options?): TailHandle

Defined in: src/core/adapters.ts:199

Start tailing a file with streaming support

Parameters

filePath

string

Path to the file to tail

options?

Optional tail options

pollInterval?

number

signal?

AbortSignal

Returns

TailHandle

Handle to the tail operation


writeFile()?

optional writeFile(filePath, contents): Promise<void>

Defined in: src/core/adapters.ts:240

Write contents to a file

Parameters

filePath

string

Path to the file

contents

string

Contents to write

Returns

Promise<void>