Skip to content

FileSystemAdapter — @gj-kit/expo-media

A public interface from @gj-kit/expo-media. The signature below is taken directly from the 0.6.1 release declaration.

import { FileSystemAdapter } from '@gj-kit/expo-media';
interface FileSystemAdapter {
/** 앱 소유 캐시 디렉토리 URI(끝에 '/'). 없으면 documentDirectory, 그것도 없으면 null. */
cacheDirectory(): string | null;
/** ⚠ throw 금지 — 코어가 후보 URI를 순회한다. 없거나 디렉토리면 그 kind를 반환. */
stat(uri: string): Promise<FileStat>;
copy(input: {
readonly from: string;
readonly to: string;
}): Promise<void>;
/** 멱등 삭제. 실패해도 throw 금지 — 스테이징 누수는 디스크 비용일 뿐이다. */
remove(uri: string): Promise<void>;
/**
* `[position, position+length)` 구간을 base64로 반환.
* ⚠ 코어는 length를 **항상 3의 배수**로 준다(§7 하드닝 9 — 3바이트가 base64 4문자에 대응하므로
* 3의 배수가 아니면 윈도우 경계에 패딩이 끼어 **해시가 조용히 틀린다**).
* 어댑터가 범위를 재정렬·병합·확장하면 그 하드닝이 무력화된다.
*/
readBase64(uri: string, range: ChunkRange): Promise<string>;
}

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-media
  • Version: 0.6.1
  • Public entry: .
  • Source: GitHub