Skip to content

Commit 54abdaf

Browse files
committed
chore: add chunk read to example app
1 parent 7d5cbe3 commit 54abdaf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

example/src/App.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ export function App() {
105105
return prev.slice();
106106
})
107107
)
108+
.then(() => FileSystem.readFileChunk(Dirs.CacheDir + '/test.txt', 5, 10))
109+
.then((res) =>
110+
setInfo((prev) => {
111+
prev.push({
112+
key: 'readFileChunk(CacheDir/test.txt, 5, 10)',
113+
value: JSON.stringify(res),
114+
});
115+
return prev.slice();
116+
})
117+
)
108118
.then(() => FileSystem.hash(Dirs.CacheDir + '/test.txt', 'MD5'))
109119
.then((res) =>
110120
setInfo((prev) => {

0 commit comments

Comments
 (0)