writes text data to a file on supported runtimes (i.e. RUNTIME.DENO, RUNTIME.BUN, or RUNTIME.NODE).
for unsupported runtimes, an error is thrown.
TODO: in the future, I would like to create a unified cross-runtime filesystem class under ./crossfs.ts,
which would support read and write operations, along with memory (internal state) of the current working directory,
in addition to a path resolver method that will rely on ./pathman.ts's resolvePathFactory function.
Throws
an error is thrown if an unsupported runtime uses this function,
or if config.create is false, and no pre-existing file resides at the specified file_path.
writes text data to a file on supported runtimes (i.e. RUNTIME.DENO, RUNTIME.BUN, or RUNTIME.NODE). for unsupported runtimes, an error is thrown.
TODO: in the future, I would like to create a unified cross-runtime filesystem class under
./crossfs.ts
, which would support read and write operations, along with memory (internal state) of the current working directory, in addition to a path resolver method that will rely on./pathman.ts
'sresolvePathFactory
function.Throws
an error is thrown if an unsupported runtime uses this function, or if
config.create
isfalse
, and no pre-existing file resides at the specifiedfile_path
.