FsAdapter
Defined in: src/core/adapters.ts:140
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:147
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:181
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:174
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:189
Check if a file exists
Parameters
filePath
string
Path to check
Returns
Promise<boolean>
Whether the file exists
readFile()?
optionalreadFile(filePath):Promise<string>
Defined in: src/core/adapters.ts:197
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:155
Start tailing a file (watching for new lines)
Parameters
options
Tail options
Returns
Promise<void>
Promise that resolves when tailing stops
tailStreaming()?
optionaltailStreaming(filePath,options?):TailHandle
Defined in: src/core/adapters.ts:164
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
Handle to the tail operation
writeFile()?
optionalwriteFile(filePath,contents):Promise<void>
Defined in: src/core/adapters.ts:205
Write contents to a file
Parameters
filePath
string
Path to the file
contents
string
Contents to write
Returns
Promise<void>