mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 19:07:41 +00:00
iOS emptied Library/Caches under storage pressure, and Android's cacheDir is cleared by Clear cache, cleaner apps and low storage. Each purge cost a full foreground download of the page build on the next open. Builds now live in Application Support (excluded from backup) on iOS and filesDir on Android (kept off device transfers), and the old cache folder moves over once.
15 lines
579 B
TypeScript
15 lines
579 B
TypeScript
import { requireOptionalNativeModule } from 'expo-modules-core'
|
|
|
|
// <name> under the app's durable storage (iOS Application Support, outside backups; Android filesDir) as a file URL.
|
|
// Null from a binary built before the function existed, or when the directory can't be made.
|
|
export function generationStoreDirectory(name: string): string | null {
|
|
const shell = requireOptionalNativeModule<{
|
|
generationStoreDirectory?: (name: string) => string
|
|
}>('OrcaMobileWebShell')
|
|
try {
|
|
return shell?.generationStoreDirectory?.(name) ?? null
|
|
} catch {
|
|
return null
|
|
}
|
|
}
|