Feat: With path (#2768)

This commit is contained in:
Jade
2024-10-29 13:09:56 -06:00
committed by GitHub
parent b952e3183f
commit e1a91a7e53

View File

@@ -174,6 +174,14 @@ export class FileHelper<A> {
return await this.writeFile(mergeData)
}
/**
* We wanted to be able to have a fileHelper, and just modify the path later in time.
* Like one behaviour of another dependency or something similar.
*/
withPath(path: string) {
return new FileHelper<A>(path, this.writeData, this.readData)
}
/**
* Create a File Helper for an arbitrary file type.
*