MCPcopy Create free account
hub / github.com/denoland/std / createSync

Function createSync

fs/unstable_create.ts:54–64  ·  view source on GitHub ↗
(path: string | URL)

Source from the content-addressed store, hash-verified

52 * @returns A {@linkcode FsFile} instance.
53 */
54export function createSync(path: string | URL): FsFile {
55 if (isDeno) {
56 return Deno.createSync(path);
57 } else {
58 try {
59 return openSync(path, { create: true, write: true, truncate: true });
60 } catch (error) {
61 throw mapError(error);
62 }
63 }
64}

Callers 1

Calls 2

openSyncFunction · 0.90
mapErrorFunction · 0.90

Tested by

no test coverage detected