Download mobile/modules/engine/src/utils/storage/zip.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 444 Bytes
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/engine/src/utils/storage/zip.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/modules/engine/src/utils/storage/zip.ts
-
curl -L -o zip.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/engine/src/utils/storage/zip.ts
444 Bytes
| import {Directory} from "expo-file-system" | |
| export function printDirectory(directory: Directory, indent: number = 0) { | |
| console.log(`${" ".repeat(indent)} + ${directory.name}`) | |
| const contents = directory.list() | |
| for (const item of contents) { | |
| if (item instanceof Directory) { | |
| printDirectory(item, indent + 2) | |
| } else { | |
| console.log(`${" ".repeat(indent + 2)} - ${item.name} (${item.size} bytes)`) | |
| } | |
| } | |
| } | |