From 535324da1fa526f5b3dc98b97eccfd3567b85335 Mon Sep 17 00:00:00 2001 From: hughfenghen Date: Sun, 19 May 2024 20:49:29 +0800 Subject: [PATCH] feat: test demo --- demo/test.html | 27 +++++++++++++++++++++++++++ demo/test.ts | 10 ++++++++++ 2 files changed, 37 insertions(+) create mode 100644 demo/test.html create mode 100644 demo/test.ts diff --git a/demo/test.html b/demo/test.html new file mode 100644 index 0000000..31bf091 --- /dev/null +++ b/demo/test.html @@ -0,0 +1,27 @@ + + + + + + + OPFS Tools + + + + + + + + + + \ No newline at end of file diff --git a/demo/test.ts b/demo/test.ts new file mode 100644 index 0000000..7d5991e --- /dev/null +++ b/demo/test.ts @@ -0,0 +1,10 @@ +import { tmpfile, write } from '../src'; + +console.log(111, localStorage.getItem('OPFS_TOOLS_EXPIRES_TMP_FILES')); +const f = tmpfile(); +console.log(222, f.path); +await write(f, '111111111'); + +await write('/.opfs-tools-temp-dir/xxx', '2222'); + +export {};