NodeFsAdapter
このコンテンツはまだ日本語訳がありません。
Defined in: src/adapters/node/fs.ts:16
Adapter interface for filesystem operations
Used primarily for LFS progress tracking via GIT_LFS_PROGRESS.
Implements
Constructors
Constructor
new NodeFsAdapter():
NodeFsAdapter
Returns
NodeFsAdapter
Methods
createTempFile()
createTempFile(
prefix):Promise<string>
Defined in: src/adapters/node/fs.ts:17
Create a temporary file and return its path
Parameters
prefix
string = 'type-git-'
Optional prefix for the temp file name
Returns
Promise<string>
Path to the created temporary file
Implementation of
deleteDirectory()
deleteDirectory(
dirPath):Promise<void>
Defined in: src/adapters/node/fs.ts:62
Delete a directory recursively
Parameters
dirPath
string
Path to the directory to delete
Returns
Promise<void>
Implementation of
deleteFile()
deleteFile(
filePath):Promise<void>
Defined in: src/adapters/node/fs.ts:58
Delete a file
Parameters
filePath
string
Path to the file to delete
Returns
Promise<void>
Implementation of
exists()
exists(
filePath):Promise<boolean>
Defined in: src/adapters/node/fs.ts:66
Check if a file exists
Parameters
filePath
string
Path to check
Returns
Promise<boolean>
Whether the file exists
Implementation of
readFile()
readFile(
filePath):Promise<string>
Defined in: src/adapters/node/fs.ts:75
Read a file’s contents
Parameters
filePath
string
Path to the file
Returns
Promise<string>
File contents as string
Implementation of
tail()
tail(
options):Promise<void>
Defined in: src/adapters/node/fs.ts:22
Start tailing a file (watching for new lines)
Parameters
options
Tail options
Returns
Promise<void>
Promise that resolves when tailing stops
Implementation of
tailStreaming()
tailStreaming(
filePath,options?):TailHandle
Defined in: src/adapters/node/fs.ts:83
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
Implementation of
writeFile()
writeFile(
filePath,contents):Promise<void>
Defined in: src/adapters/node/fs.ts:79
Write contents to a file
Parameters
filePath
string
Path to the file
contents
string
Contents to write
Returns
Promise<void>