first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import { NativeModule } from 'expo-modules-core';
import type { Directory, File, DownloadOptions, PathInfo } from './ExpoFileSystem.types';
declare class ExpoFileSystemModule extends NativeModule {
FileSystemDirectory: typeof Directory;
FileSystemFile: typeof File;
downloadFileAsync(url: string, destination: File | Directory, options?: DownloadOptions): Promise<string>;
pickDirectoryAsync(initialUri?: string): Promise<Directory>;
pickFileAsync(initialUri?: string, mimeType?: string): Promise<File>;
info(uri: string): PathInfo;
totalDiskSpace: number;
availableDiskSpace: number;
documentDirectory: string;
cacheDirectory: string;
bundleDirectory: string;
appleSharedContainers?: Record<string, string>;
}
declare const _default: ExpoFileSystemModule;
export default _default;
//# sourceMappingURL=ExpoFileSystem.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFileSystem.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEzF,OAAO,OAAO,oBAAqB,SAAQ,YAAY;IACrD,mBAAmB,EAAE,OAAO,SAAS,CAAC;IACtC,cAAc,EAAE,OAAO,IAAI,CAAC;IAC5B,iBAAiB,CACf,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,IAAI,GAAG,SAAS,EAC7B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC;IAClB,kBAAkB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAC3D,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACpE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChD;;AAED,wBAAuE"}

View File

@@ -0,0 +1,389 @@
export type FileCreateOptions = {
/**
* Whether to create intermediate directories if they do not exist.
* @default false
*/
intermediates?: boolean;
/**
* Whether to overwrite the file if it exists.
* @default false
*/
overwrite?: boolean;
};
export declare enum EncodingType {
/**
* Standard encoding format.
*/
UTF8 = "utf8",
/**
* Binary, radix-64 representation.
*/
Base64 = "base64"
}
export type FileWriteOptions = {
/**
* The encoding format to use when writing the file.
* @default FileSystem.EncodingType.UTF8
*/
encoding?: EncodingType | 'utf8' | 'base64';
/**
* Whether to append the contents to the end of the file or overwrite the existing file.
* @default false
*/
append?: boolean;
};
export type DirectoryCreateOptions = {
/**
* Whether to create intermediate directories if they do not exist.
* @default false
*/
intermediates?: boolean;
/**
* Whether to overwrite the directory if it exists.
* @default false
*/
overwrite?: boolean;
/**
* This flag controls whether the `create` operation is idempotent
* (safe to call multiple times without error).
*
* If `true`, creating a file or directory that already exists will succeed silently.
* If `false`, an error will be thrown when the target already exists.
*
* @default false
*/
idempotent?: boolean;
};
export declare class Directory {
/**
* Creates an instance of a directory.
* @param uris An array of: `file:///` string URIs, `File` instances, `Directory` instances representing an arbitrary location on the file system. The location does not need to exist, or it may already contain a file.
* @example
* ```ts
* const directory = new Directory("file:///path/to/directory");
* ```
*/
constructor(...uris: (string | File | Directory)[]);
/**
* Represents the directory URI. The field is read-only, but it may change as a result of calling some methods such as `move`.
*/
readonly uri: string;
/**
* Validates a directory path.
* @hidden This method is not meant to be used directly. It is called by the JS constructor.
*/
validatePath(): void;
/**
* Deletes a directory. Also deletes all files and directories inside the directory.
*
* @throws Error if the directory does not exist or cannot be deleted.
*/
delete(): void;
/**
* A boolean representing if a directory exists and can be accessed.
*/
exists: boolean;
/**
* Creates a directory that the current uri points to.
*
* @throws Error if the containing folder doesn't exist, the application has no read access to it or the directory (or a file with the same path) already exists (unless `idempotent` is `true`).
*/
create(options?: DirectoryCreateOptions): void;
createFile(name: string, mimeType: string | null): File;
createDirectory(name: string): Directory;
/**
* Copies a directory.
*/
copy(destination: Directory | File): void;
/**
* Moves a directory. Updates the `uri` property that now points to the new location.
*/
move(destination: Directory | File): void;
/**
* Renames a directory.
*/
rename(newName: string): void;
/**
* @hidden
* Lists the contents of a directory. Should not be used directly, as it returns a list of paths.
* This function is internal and will be removed in the future (when returning arrays of shared objects is supported).
*/
listAsRecords(): {
isDirectory: string;
uri: string;
}[];
/**
* Lists the contents of a directory.
*/
list(): (Directory | File)[];
/**
* Retrieves an object containing properties of a directory.
*
* @throws Error If the application does not have read access to the directory, or if the path does not point to a directory (e.g., it points to a file).
*
* @returns An object with directory metadata (for example, size, creation date, and so on).
*/
info(): DirectoryInfo;
/**
* A size of the directory in bytes. Null if the directory does not exist, or it cannot be read.
*/
size: number | null;
/**
* A static method that opens a file picker to select a directory.
*
* On iOS, the selected directory grants temporary read and write access for the current app session only. After the app restarts, you must prompt the user again to regain access.
*
* @param initialUri An optional uri pointing to an initial folder on which the directory picker is opened.
* @returns a `Directory` instance. On Android, the underlying uri will be a content URI.
*/
static pickDirectoryAsync(initialUri?: string): Promise<Directory>;
}
export type DownloadOptions = {
/**
* The headers to send with the request.
*/
headers?: {
[key: string]: string;
};
/**
* This flag controls whether the `download` operation is idempotent
* (safe to call multiple times without error).
*
* If `true`, downloading a file that already exists overwrites the previous one.
* If `false`, an error is thrown when the target file already exists.
*
* @default false
*/
idempotent?: boolean;
};
/**
* Represents a file on the file system.
*/
export declare class File {
/**
* Creates an instance of File.
*
* @param uris A `file:///` URI representing an arbitrary location on the file system. The location does not need to exist, or it may already contain a directory.
*/
constructor(...uris: (string | File | Directory)[]);
/**
* Represents the file URI. The field is read-only, but it may change as a result of calling some methods such as `move`.
*/
readonly uri: string;
/**
* @hidden This method is not meant to be used directly. It is called by the JS constructor.
* Validates a directory path.
*/
validatePath(): void;
/**
* Retrieves text from the file.
* @returns A promise that resolves with the contents of the file as string.
*/
text(): Promise<string>;
/**
* Retrieves text from the file.
* @returns The contents of the file as string.
*/
textSync(): string;
/**
* Retrieves content of the file as base64.
* @returns A promise that resolves with the contents of the file as a base64 string.
*/
base64(): Promise<string>;
/**
* Retrieves content of the file as base64.
* @returns The contents of the file as a base64 string.
*/
base64Sync(): string;
/**
* Retrieves byte content of the entire file.
* @returns A promise that resolves with the contents of the file as a `Uint8Array`.
*/
bytes(): Promise<Uint8Array<ArrayBuffer>>;
/**
* Retrieves byte content of the entire file.
* @returns The contents of the file as a `Uint8Array`.
*/
bytesSync(): Uint8Array;
/**
* Writes content to the file.
* @param content The content to write into the file.
*/
write(content: string | Uint8Array, options?: FileWriteOptions): void;
/**
* Deletes a file.
*
* @throws Error if the directory does not exist or cannot be deleted.
*/
delete(): void;
/**
* Retrieves an object containing properties of a file
* @throws Error If the application does not have read access to the file, or if the path does not point to a file (for example, it points to a directory).
* @returns An object with file metadata (for example, size, creation date, and so on).
*/
info(options?: InfoOptions): FileInfo;
/**
* A boolean representing if a file exists. `true` if the file exists, `false` otherwise.
* Also, `false` if the application does not have read access to the file.
*/
exists: boolean;
/**
* Creates a file.
*
* @throws Error if the containing folder doesn't exist, the application has no read access to it or the file (or directory with the same path) already exists.
*/
create(options?: FileCreateOptions): void;
/**
* Copies a file.
*/
copy(destination: Directory | File): void;
/**
* Moves a directory. Updates the `uri` property that now points to the new location.
*/
move(destination: Directory | File): void;
/**
* Renames a file.
*/
rename(newName: string): void;
/**
* Returns A `FileHandle` object that can be used to read and write data to the file.
* @throws Error if the file does not exist or cannot be opened.
*/
open(): FileHandle;
/**
* A static method that downloads a file from the network.
*
* On Android, the response body streams directly into the target file. If the download fails after
* it starts, a partially written file may remain at the destination. On iOS, the download first
* completes in a temporary location and the file is moved into place only after success, so no
* file is left behind when the request fails.
*
* @param url - The URL of the file to download.
* @param destination - The destination directory or file. If a directory is provided, the resulting filename will be determined based on the response headers.
* @param options - Download options. When the destination already contains a file, the promise rejects with a `DestinationAlreadyExists` error unless `options.idempotent` is set to `true`. With `idempotent: true`, the download overwrites the existing file instead of failing.
*
* @returns A promise that resolves to the downloaded file. When the server responds with
* a non-2xx HTTP status, the promise rejects with an `UnableToDownload` error whose
* message includes the status code. No file is created in that scenario.
*
* @example
* ```ts
* const file = await File.downloadFileAsync("https://example.com/image.png", new Directory(Paths.document));
* ```
*/
static downloadFileAsync(url: string, destination: Directory | File, options?: DownloadOptions): Promise<File>;
/**
* A static method that opens a file picker to select a single file of specified type. On iOS, it returns a temporary copy of the file leaving the original file untouched.
*
* Selecting multiple files is not supported yet.
*
* @param initialUri An optional URI pointing to an initial folder on which the file picker is opened.
* @param mimeType A mime type that is used to filter out files that can be picked out.
* @returns A `File` instance or an array of `File` instances.
*/
static pickFileAsync(initialUri?: string, mimeType?: string): Promise<File | File[]>;
/**
* A size of the file in bytes. 0 if the file does not exist, or it cannot be read.
*/
size: number;
/**
* A md5 hash of the file. Null if the file does not exist, or it cannot be read.
*/
md5: string | null;
/**
* A last modification time of the file expressed in milliseconds since epoch. Returns a Null if the file does not exist, or it cannot be read.
*/
modificationTime: number | null;
/**
* A creation time of the file expressed in milliseconds since epoch. Returns null if the file does not exist, cannot be read or the Android version is earlier than API 26.
*/
creationTime: number | null;
/**
* A mime type of the file. An empty string if the file does not exist, or it cannot be read.
*/
type: string;
/**
* A content URI to the file that can be shared to external applications.
* @platform android
*/
contentUri: string;
}
export declare class FileHandle {
close(): void;
readBytes(length: number): Uint8Array<ArrayBuffer>;
writeBytes(bytes: Uint8Array): void;
offset: number | null;
size: number | null;
}
export type FileInfo = {
/**
* Indicates whether the file exists.
*/
exists: boolean;
/**
* A URI pointing to the file. This is the same as the `fileUri` input parameter
* and preserves its scheme (for example, `file://` or `content://`).
*/
uri?: string;
/**
* The size of the file in bytes.
*/
size?: number;
/**
* The last modification time of the file expressed in milliseconds since epoch.
*/
modificationTime?: number;
/**
* A creation time of the file expressed in milliseconds since epoch. Returns null if the Android version is earlier than API 26.
*/
creationTime?: number;
/**
* Present if the `md5` option was truthy. Contains the MD5 hash of the file.
*/
md5?: string;
};
export type InfoOptions = {
/**
* Whether to return the MD5 hash of the file.
*
* @default false
*/
md5?: boolean;
};
export type PathInfo = {
/**
* Indicates whether the path exists. Returns true if it exists; false if the path does not exist or if there is no read permission.
*/
exists: boolean;
/**
* Indicates whether the path is a directory. Returns true or false if the path exists; otherwise, returns null.
*/
isDirectory: boolean | null;
};
export type DirectoryInfo = {
/**
* Indicates whether the directory exists.
*/
exists: boolean;
/**
* A `file://` URI pointing to the directory.
*/
uri?: string;
/**
* The size of the file in bytes.
*/
size?: number;
/**
* The last modification time of the directory expressed in milliseconds since epoch.
*/
modificationTime?: number;
/**
* A creation time of the directory expressed in milliseconds since epoch. Returns null if the Android version is earlier than API 26.
*/
creationTime?: number;
/**
* A list of file names contained within a directory.
*/
files?: string[];
};
//# sourceMappingURL=ExpoFileSystem.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFileSystem.types.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,oBAAY,YAAY;IACtB;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC5C;;;OAGG;IACH,MAAM,CAA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M,CAAC;IACd;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC"}

View File

@@ -0,0 +1,20 @@
declare class FileSystemFile {
constructor();
}
declare class FileSystemDirectory {
constructor();
}
declare const _default: {
FileSystemDirectory: typeof FileSystemDirectory;
FileSystemFile: typeof FileSystemFile;
downloadFileAsync: () => Promise<void>;
pickDirectoryAsync: () => Promise<void>;
pickFileAsync: () => Promise<void>;
readonly totalDiskSpace: number;
readonly availableDiskSpace: number;
readonly documentDirectory: string;
readonly cacheDirectory: string;
readonly bundleDirectory: string;
};
export default _default;
//# sourceMappingURL=ExpoFileSystem.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoFileSystem.web.d.ts","sourceRoot":"","sources":["../src/ExpoFileSystem.web.ts"],"names":[],"mappings":"AAAA,cAAM,cAAc;;CAInB;AAED,cAAM,mBAAmB;;CAIxB;;;;;;;6BAiBuB,MAAM;iCAIF,MAAM;gCAIP,MAAM;6BAIT,MAAM;8BAIL,MAAM;;AA/B/B,wBAmCE"}

110
node_modules/expo-file-system/build/FileSystem.d.ts generated vendored Normal file
View File

@@ -0,0 +1,110 @@
import ExpoFileSystem from './ExpoFileSystem';
import type { DownloadOptions, PathInfo } from './ExpoFileSystem.types';
import { PathUtilities } from './pathUtilities';
export declare class Paths extends PathUtilities {
/**
* A property containing the cache directory a place to store files that can be deleted by the system when the device runs low on storage.
*/
static get cache(): Directory;
/**
* A property containing the bundle directory the directory where assets bundled with the application are stored.
*/
static get bundle(): Directory;
/**
* A property containing the document directory a place to store files that are safe from being deleted by the system.
*/
static get document(): Directory;
static get appleSharedContainers(): Record<string, Directory>;
/**
* A property that represents the total space on device's internal storage, represented in bytes.
*/
static get totalDiskSpace(): number;
/**
* A property that represents the available space on device's internal storage, represented in bytes.
*/
static get availableDiskSpace(): number;
/**
* Returns an object that indicates if the specified path represents a directory.
*/
static info(...uris: string[]): PathInfo;
}
/**
* Represents a file on the filesystem.
*
* A `File` instance can be created for any path, and does not need to exist on the filesystem during creation.
*
* The constructor accepts an array of strings that are joined to create the file URI. The first argument can also be a `Directory` instance (like `Paths.cache`) or a `File` instance (which creates a new reference to the same file).
* @example
* ```ts
* const file = new File(Paths.cache, "subdirName", "file.txt");
* ```
*/
export declare class File extends ExpoFileSystem.FileSystemFile implements Blob {
static downloadFileAsync: (url: string, destination: Directory | File, options?: DownloadOptions) => Promise<File>;
static pickFileAsync: (initialUri?: string, mimeType?: string) => Promise<File | File[]>;
/**
* Creates an instance of a file. It can be created for any path, and does not need to exist on the filesystem during creation.
*
* The constructor accepts an array of strings that are joined to create the file URI. The first argument can also be a `Directory` instance (like `Paths.cache`) or a `File` instance (which creates a new reference to the same file).
* @param uris An array of: `file:///` string URIs, `File` instances, and `Directory` instances representing an arbitrary location on the file system.
* @example
* ```ts
* const file = new File(Paths.cache, "subdirName", "file.txt");
* ```
*/
constructor(...uris: (string | File | Directory)[]);
get parentDirectory(): Directory;
/**
* File extension.
* @example '.png'
*/
get extension(): string;
/**
* File name. Includes the extension.
*/
get name(): string;
readableStream(): ReadableStream<Uint8Array<ArrayBuffer>>;
writableStream(): WritableStream<Uint8Array<ArrayBufferLike>>;
arrayBuffer(): Promise<ArrayBuffer>;
stream(): ReadableStream<Uint8Array<ArrayBuffer>>;
slice(start?: number, end?: number, contentType?: string): Blob;
}
/**
* Represents a directory on the filesystem.
*
* A `Directory` instance can be created for any path, and does not need to exist on the filesystem during creation.
*
* The constructor accepts an array of strings that are joined to create the directory URI. The first argument can also be a `Directory` instance (like `Paths.cache`).
* @example
* ```ts
* const directory = new Directory(Paths.cache, "subdirName");
* ```
*/
export declare class Directory extends ExpoFileSystem.FileSystemDirectory {
static pickDirectoryAsync: (initialUri?: string) => Promise<Directory>;
/**
* Creates an instance of a directory. It can be created for any path, and does not need to exist on the filesystem during creation.
*
* The constructor accepts an array of strings that are joined to create the directory URI. The first argument can also be a `Directory` instance (like `Paths.cache`).
* @param uris An array of: `file:///` string URIs, `File` instances, and `Directory` instances representing an arbitrary location on the file system.
* @example
* ```ts
* const directory = new Directory(Paths.cache, "subdirName");
* ```
*/
constructor(...uris: (string | File | Directory)[]);
get parentDirectory(): Directory;
/**
* Lists the contents of a directory.
* Calling this method if the parent directory does not exist will throw an error.
* @returns An array of `Directory` and `File` instances.
*/
list(): (Directory | File)[];
/**
* Directory name.
*/
get name(): string;
createFile(name: string, mimeType: string | null): File;
createDirectory(name: string): Directory;
}
//# sourceMappingURL=FileSystem.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FileSystem.d.ts","sourceRoot":"","sources":["../src/FileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,qB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cAAc,CAAC,mBAAmB;IAC/D,MAAM,CAAC,kBAAkB,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAEvE;;;;;;;;;OASG;gBACS,GAAG,IAAI,EAAE,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE;IAQlD,IAAI,eAAe,cAElB;IAED;;;;OAIG;IACM,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE;IAOrC;;OAEG;IACH,IAAI,IAAI,WAEP;IAED,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAKvD,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;CAGzC"}

4
node_modules/expo-file-system/build/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export * from './FileSystem';
export { type FileCreateOptions, type DirectoryCreateOptions, type FileHandle, type FileInfo, type InfoOptions, type PathInfo, type DirectoryInfo, type DownloadOptions, } from './ExpoFileSystem.types';
export * from './legacyWarnings';
//# sourceMappingURL=index.d.ts.map

1
node_modules/expo-file-system/build/index.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,wBAAwB,CAAC;AAEhC,cAAc,kBAAkB,CAAC"}

View File

@@ -0,0 +1,3 @@
declare const _default: any;
export default _default;
//# sourceMappingURL=ExponentFileSystem.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExponentFileSystem.d.ts","sourceRoot":"","sources":["../../src/legacy/ExponentFileSystem.ts"],"names":[],"mappings":";AAIA,wBAA2F"}

View File

@@ -0,0 +1,3 @@
import ExponentFileSystemShim from './ExponentFileSystemShim';
export default ExponentFileSystemShim;
//# sourceMappingURL=ExponentFileSystem.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExponentFileSystem.web.d.ts","sourceRoot":"","sources":["../../src/legacy/ExponentFileSystem.web.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,eAAe,sBAAsB,CAAC"}

View File

@@ -0,0 +1,8 @@
import { NativeModule } from 'expo-modules-core';
import type { ExponentFileSystemModule, FileSystemEvents } from './types';
export default class FileSystemShim extends NativeModule<FileSystemEvents> implements ExponentFileSystemModule {
documentDirectory: null;
cacheDirectory: null;
bundleDirectory: null;
}
//# sourceMappingURL=ExponentFileSystemShim.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExponentFileSystemShim.d.ts","sourceRoot":"","sources":["../../src/legacy/ExponentFileSystemShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE1E,MAAM,CAAC,OAAO,OAAO,cACnB,SAAQ,YAAY,CAAC,gBAAgB,CACrC,YAAW,wBAAwB;IAEnC,iBAAiB,OAAQ;IACzB,cAAc,OAAQ;IACtB,eAAe,OAAQ;CACxB"}

View File

@@ -0,0 +1,365 @@
import { DownloadOptions, DownloadPauseState, FileSystemNetworkTaskProgressCallback, DownloadProgressData, UploadProgressData, FileInfo, FileSystemDownloadResult, FileSystemRequestDirectoryPermissionsResult, FileSystemUploadOptions, FileSystemUploadResult, ReadingOptions, WritingOptions, DeletingOptions, InfoOptions, RelocatingOptions, MakeDirectoryOptions } from './FileSystem.types';
/**
* `file://` URI pointing to the directory where user documents for this app will be stored.
* Files stored here will remain until explicitly deleted by the app. Ends with a trailing `/`.
* Example uses are for files the user saves that they expect to see again.
*/
export declare const documentDirectory: string | null;
/**
* `file://` URI pointing to the directory where temporary files used by this app will be stored.
* Files stored here may be automatically deleted by the system when low on storage.
* Example uses are for downloaded or generated files that the app just needs for one-time usage.
*/
export declare const cacheDirectory: string | null;
/**
* URI to the directory where assets bundled with the application are stored.
*/
export declare const bundleDirectory: string | null;
/**
* Get metadata information about a file, directory or external content/asset.
* @param fileUri URI to the file or directory. See [supported URI schemes](#supported-uri-schemes).
* @param options A map of options represented by [`InfoOptions`](#infooptions) type.
* @return A Promise that resolves to a `FileInfo` object. If no item exists at this URI,
* the returned Promise resolves to `FileInfo` object in form of `{ exists: false, isDirectory: false }`.
*/
export declare function getInfoAsync(fileUri: string, options?: InfoOptions): Promise<FileInfo>;
/**
* Read the entire contents of a file as a string. Binary will be returned in raw format, you will need to append `data:image/png;base64,` to use it as Base64.
* @param fileUri `file://` or [SAF](#saf-uri) URI to the file or directory.
* @param options A map of read options represented by [`ReadingOptions`](#readingoptions) type.
* @return A Promise that resolves to a string containing the entire contents of the file.
*/
export declare function readAsStringAsync(fileUri: string, options?: ReadingOptions): Promise<string>;
/**
* Takes a `file://` URI and converts it into content URI (`content://`) so that it can be accessed by other applications outside of Expo.
* @param fileUri The local URI of the file. If there is no file at this URI, an exception will be thrown.
* @example
* ```js
* FileSystem.getContentUriAsync(uri).then(cUri => {
* console.log(cUri);
* IntentLauncher.startActivityAsync('android.intent.action.VIEW', {
* data: cUri,
* flags: 1,
* });
* });
* ```
* @return Returns a Promise that resolves to a `string` containing a `content://` URI pointing to the file.
* The URI is the same as the `fileUri` input parameter but in a different format.
* @platform android
*/
export declare function getContentUriAsync(fileUri: string): Promise<string>;
/**
* Write the entire contents of a file as a string.
* @param fileUri `file://` or [SAF](#saf-uri) URI to the file or directory.
* > Note: when you're using SAF URI the file needs to exist. You can't create a new file.
* @param contents The string to replace the contents of the file with.
* @param options A map of write options represented by [`WritingOptions`](#writingoptions) type.
*/
export declare function writeAsStringAsync(fileUri: string, contents: string, options?: WritingOptions): Promise<void>;
/**
* Delete a file or directory. If the URI points to a directory, the directory and all its contents are recursively deleted.
* @param fileUri `file://` or [SAF](#saf-uri) URI to the file or directory.
* @param options A map of write options represented by [`DeletingOptions`](#deletingoptions) type.
*/
export declare function deleteAsync(fileUri: string, options?: DeletingOptions): Promise<void>;
export declare function deleteLegacyDocumentDirectoryAndroid(): Promise<void>;
/**
* Move a file or directory to a new location.
* @param options A map of move options represented by [`RelocatingOptions`](#relocatingoptions) type.
*/
export declare function moveAsync(options: RelocatingOptions): Promise<void>;
/**
* Create a copy of a file or directory. Directories are recursively copied with all of their contents.
* It can be also used to copy content shared by other apps to local filesystem.
* @param options A map of move options represented by [`RelocatingOptions`](#relocatingoptions) type.
*/
export declare function copyAsync(options: RelocatingOptions): Promise<void>;
/**
* Create a new empty directory.
* @param fileUri `file://` URI to the new directory to create.
* @param options A map of create directory options represented by [`MakeDirectoryOptions`](#makedirectoryoptions) type.
*/
export declare function makeDirectoryAsync(fileUri: string, options?: MakeDirectoryOptions): Promise<void>;
/**
* Enumerate the contents of a directory.
* @param fileUri `file://` URI to the directory.
* @return A Promise that resolves to an array of strings, each containing the name of a file or directory contained in the directory at `fileUri`.
*/
export declare function readDirectoryAsync(fileUri: string): Promise<string[]>;
/**
* Gets the available internal disk storage size, in bytes. This returns the free space on the data partition that hosts all of the internal storage for all apps on the device.
* @return Returns a Promise that resolves to the number of bytes available on the internal disk.
*/
export declare function getFreeDiskStorageAsync(): Promise<number>;
/**
* Gets total internal disk storage size, in bytes. This is the total capacity of the data partition that hosts all the internal storage for all apps on the device.
* @return Returns a Promise that resolves to a number that specifies the total internal disk storage capacity in bytes.
*/
export declare function getTotalDiskCapacityAsync(): Promise<number>;
/**
* Download the contents at a remote URI to a file in the app's file system. The directory for a local file uri must exist prior to calling this function.
* @param uri The remote URI to download from.
* @param fileUri The local URI of the file to download to. If there is no file at this URI, a new one is created.
* If there is a file at this URI, its contents are replaced. The directory for the file must exist.
* @param options A map of download options represented by [`DownloadOptions`](#downloadoptions) type.
* @example
* ```js
* FileSystem.downloadAsync(
* 'http://techslides.com/demos/sample-videos/small.mp4',
* FileSystem.documentDirectory + 'small.mp4'
* )
* .then(({ uri }) => {
* console.log('Finished downloading to ', uri);
* })
* .catch(error => {
* console.error(error);
* });
* ```
* @return Returns a Promise that resolves to a `FileSystemDownloadResult` object.
*/
export declare function downloadAsync(uri: string, fileUri: string, options?: DownloadOptions): Promise<FileSystemDownloadResult>;
/**
* Upload the contents of the file pointed by `fileUri` to the remote url.
* @param url The remote URL, where the file will be sent.
* @param fileUri The local URI of the file to send. The file must exist.
* @param options A map of download options represented by [`FileSystemUploadOptions`](#filesystemuploadoptions) type.
* @example
* **Client**
*
* ```js
* import * as FileSystem from 'expo-file-system/legacy';
*
* try {
* const response = await FileSystem.uploadAsync(`http://192.168.0.1:1234/binary-upload`, fileUri, {
* fieldName: 'file',
* httpMethod: 'PATCH',
* uploadType: FileSystem.FileSystemUploadType.BINARY_CONTENT,
* });
* console.log(JSON.stringify(response, null, 4));
* } catch (error) {
* console.log(error);
* }
* ```
*
* **Server**
*
* Refer to the "[Server: Handling multipart requests](#server-handling-multipart-requests)" example - there is code for a simple Node.js server.
* @return Returns a Promise that resolves to `FileSystemUploadResult` object.
*/
export declare function uploadAsync(url: string, fileUri: string, options?: FileSystemUploadOptions): Promise<FileSystemUploadResult>;
/**
* Create a `DownloadResumable` object which can start, pause, and resume a download of contents at a remote URI to a file in the app's file system.
* > Note: You need to call `downloadAsync()`, on a `DownloadResumable` instance to initiate the download.
* The `DownloadResumable` object has a callback that provides download progress updates.
* Downloads can be resumed across app restarts by using `AsyncStorage` to store the `DownloadResumable.savable()` object for later retrieval.
* The `savable` object contains the arguments required to initialize a new `DownloadResumable` object to resume the download after an app restart.
* The directory for a local file uri must exist prior to calling this function.
* @param uri The remote URI to download from.
* @param fileUri The local URI of the file to download to. If there is no file at this URI, a new one is created.
* If there is a file at this URI, its contents are replaced. The directory for the file must exist.
* @param options A map of download options represented by [`DownloadOptions`](#downloadoptions) type.
* @param callback This function is called on each data write to update the download progress.
* > **Note**: When the app has been moved to the background, this callback won't be fired until it's moved to the foreground.
* @param resumeData The string which allows the api to resume a paused download. This is set on the `DownloadResumable` object automatically when a download is paused.
* When initializing a new `DownloadResumable` this should be `null`.
*/
export declare function createDownloadResumable(uri: string, fileUri: string, options?: DownloadOptions, callback?: FileSystemNetworkTaskProgressCallback<DownloadProgressData>, resumeData?: string): DownloadResumable;
export declare function createUploadTask(url: string, fileUri: string, options?: FileSystemUploadOptions, callback?: FileSystemNetworkTaskProgressCallback<UploadProgressData>): UploadTask;
export declare abstract class FileSystemCancellableNetworkTask<T extends DownloadProgressData | UploadProgressData> {
private _uuid;
protected taskWasCanceled: boolean;
private subscription?;
cancelAsync(): Promise<void>;
protected isTaskCancelled(): boolean;
protected get uuid(): string;
protected abstract getEventName(): string;
protected abstract getCallback(): FileSystemNetworkTaskProgressCallback<T> | undefined;
protected addSubscription(): void;
protected removeSubscription(): void;
}
export declare class UploadTask extends FileSystemCancellableNetworkTask<UploadProgressData> {
private url;
private fileUri;
private callback?;
private options;
constructor(url: string, fileUri: string, options?: FileSystemUploadOptions, callback?: FileSystemNetworkTaskProgressCallback<UploadProgressData> | undefined);
protected getEventName(): string;
protected getCallback(): FileSystemNetworkTaskProgressCallback<UploadProgressData> | undefined;
uploadAsync(): Promise<FileSystemUploadResult | undefined | null>;
}
export declare class DownloadResumable extends FileSystemCancellableNetworkTask<DownloadProgressData> {
private url;
private _fileUri;
private options;
private callback?;
private resumeData?;
constructor(url: string, _fileUri: string, options?: DownloadOptions, callback?: FileSystemNetworkTaskProgressCallback<DownloadProgressData> | undefined, resumeData?: string | undefined);
get fileUri(): string;
protected getEventName(): string;
protected getCallback(): FileSystemNetworkTaskProgressCallback<DownloadProgressData> | undefined;
/**
* Download the contents at a remote URI to a file in the app's file system.
* @return Returns a Promise that resolves to `FileSystemDownloadResult` object, or to `undefined` when task was cancelled.
*/
downloadAsync(): Promise<FileSystemDownloadResult | undefined>;
/**
* Pause the current download operation. `resumeData` is added to the `DownloadResumable` object after a successful pause operation.
* Returns an object that can be saved with `AsyncStorage` for future retrieval (the same object that is returned from calling `FileSystem.DownloadResumable.savable()`).
* @return Returns a Promise that resolves to `DownloadPauseState` object.
*/
pauseAsync(): Promise<DownloadPauseState>;
/**
* Resume a paused download operation.
* @return Returns a Promise that resolves to `FileSystemDownloadResult` object, or to `undefined` when task was cancelled.
*/
resumeAsync(): Promise<FileSystemDownloadResult | undefined>;
/**
* Method to get the object which can be saved with `AsyncStorage` for future retrieval.
* @returns Returns object in shape of `DownloadPauseState` type.
*/
savable(): DownloadPauseState;
}
/**
* The `StorageAccessFramework` is a namespace inside of the `expo-file-system` module, which encapsulates all functions which can be used with [SAF URIs](#saf-uri).
* You can read more about SAF in the [Android documentation](https://developer.android.com/guide/topics/providers/document-provider).
*
* @example
* # Basic Usage
*
* ```ts
* import { StorageAccessFramework } from 'expo-file-system';
*
* // Requests permissions for external directory
* const permissions = await StorageAccessFramework.requestDirectoryPermissionsAsync();
*
* if (permissions.granted) {
* // Gets SAF URI from response
* const uri = permissions.directoryUri;
*
* // Gets all files inside of selected directory
* const files = await StorageAccessFramework.readDirectoryAsync(uri);
* alert(`Files inside ${uri}:\n\n${JSON.stringify(files)}`);
* }
* ```
*
* # Migrating an album
*
* ```ts
* import * as MediaLibrary from 'expo-media-library';
* import * as FileSystem from 'expo-file-system/legacy';
* const { StorageAccessFramework } = FileSystem;
*
* async function migrateAlbum(albumName: string) {
* // Gets SAF URI to the album
* const albumUri = StorageAccessFramework.getUriForDirectoryInRoot(albumName);
*
* // Requests permissions
* const permissions = await StorageAccessFramework.requestDirectoryPermissionsAsync(albumUri);
* if (!permissions.granted) {
* return;
* }
*
* const permittedUri = permissions.directoryUri;
* // Checks if users selected the correct folder
* if (!permittedUri.includes(albumName)) {
* return;
* }
*
* const mediaLibraryPermissions = await MediaLibrary.requestPermissionsAsync();
* if (!mediaLibraryPermissions.granted) {
* return;
* }
*
* // Moves files from external storage to internal storage
* await StorageAccessFramework.moveAsync({
* from: permittedUri,
* to: FileSystem.documentDirectory!,
* });
*
* const outputDir = FileSystem.documentDirectory! + albumName;
* const migratedFiles = await FileSystem.readDirectoryAsync(outputDir);
*
* // Creates assets from local files
* const [newAlbumCreator, ...assets] = await Promise.all(
* migratedFiles.map<Promise<MediaLibrary.Asset>>(
* async fileName => await MediaLibrary.createAssetAsync(outputDir + '/' + fileName)
* )
* );
*
* // Album was empty
* if (!newAlbumCreator) {
* return;
* }
*
* // Creates a new album in the scoped directory
* const newAlbum = await MediaLibrary.createAlbumAsync(albumName, newAlbumCreator, false);
* if (assets.length) {
* await MediaLibrary.addAssetsToAlbumAsync(assets, newAlbum, false);
* }
* }
* ```
* @platform Android
*/
export declare namespace StorageAccessFramework {
/**
* Gets a [SAF URI](#saf-uri) pointing to a folder in the Android root directory. You can use this function to get URI for
* `StorageAccessFramework.requestDirectoryPermissionsAsync()` when you trying to migrate an album. In that case, the name of the album is the folder name.
* @param folderName The name of the folder which is located in the Android root directory.
* @return Returns a [SAF URI](#saf-uri) to a folder.
* @platform Android
*/
function getUriForDirectoryInRoot(folderName: string): string;
/**
* Allows users to select a specific directory, granting your app access to all of the files and sub-directories within that directory.
* @param initialFileUrl The [SAF URI](#saf-uri) of the directory that the file picker should display when it first loads.
* If URI is incorrect or points to a non-existing folder, it's ignored.
* @platform android 11+
* @return Returns a Promise that resolves to `FileSystemRequestDirectoryPermissionsResult` object.
*/
function requestDirectoryPermissionsAsync(initialFileUrl?: string | null): Promise<FileSystemRequestDirectoryPermissionsResult>;
/**
* Enumerate the contents of a directory.
* @param dirUri [SAF](#saf-uri) URI to the directory.
* @return A Promise that resolves to an array of strings, each containing the full [SAF URI](#saf-uri) of a file or directory contained in the directory at `fileUri`.
* @platform Android
*/
function readDirectoryAsync(dirUri: string): Promise<string[]>;
/**
* Creates a new empty directory.
* @param parentUri The [SAF](#saf-uri) URI to the parent directory.
* @param dirName The name of new directory.
* @return A Promise that resolves to a [SAF URI](#saf-uri) to the created directory.
* @platform Android
*/
function makeDirectoryAsync(parentUri: string, dirName: string): Promise<string>;
/**
* Creates a new empty file.
* @param parentUri The [SAF](#saf-uri) URI to the parent directory.
* @param fileName The name of new file **without the extension**.
* @param mimeType The MIME type of new file.
* @return A Promise that resolves to a [SAF URI](#saf-uri) to the created file.
* @platform Android
*/
function createFileAsync(parentUri: string, fileName: string, mimeType: string): Promise<string>;
/**
* Alias for [`writeAsStringAsync`](#filesystemwriteasstringasyncfileuri-contents-options) method.
*/
const writeAsStringAsync: typeof import("./FileSystem").writeAsStringAsync;
/**
* Alias for [`readAsStringAsync`](#filesystemreadasstringasyncfileuri-options) method.
*/
const readAsStringAsync: typeof import("./FileSystem").readAsStringAsync;
/**
* Alias for [`deleteAsync`](#filesystemdeleteasyncfileuri-options) method.
*/
const deleteAsync: typeof import("./FileSystem").deleteAsync;
/**
* Alias for [`moveAsync`](#filesystemmoveasyncoptions) method.
*/
const moveAsync: typeof import("./FileSystem").moveAsync;
/**
* Alias for [`copyAsync`](#filesystemcopyasyncoptions) method.
*/
const copyAsync: typeof import("./FileSystem").copyAsync;
}
//# sourceMappingURL=FileSystem.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FileSystem.d.ts","sourceRoot":"","sources":["../../src/legacy/FileSystem.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,qCAAqC,EACrC,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EAER,wBAAwB,EACxB,2CAA2C,EAE3C,uBAAuB,EACvB,sBAAsB,EAGtB,cAAc,EACd,cAAc,EACd,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAe5B;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,eAA6D,CAAC;AAE5F;;;;GAIG;AACH,eAAO,MAAM,cAAc,eA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AAW,IAAI,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAmBlE;;;OAGG;IACH,OAAO,IAAI,kBAAkB;CAQ9B;AAQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AACH,yBAAiB,sBAAsB,CAAC;IACtC;;;;;;OAMG;IACH,SAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,UAE1D;IAED;;;;;;OAMG;IACH,SAAsB,gCAAgC,CACpD,cAAc,GAAE,MAAM,GAAG,IAAW,GACnC,OAAO,CAAC,2CAA2C,CAAC,CAStD;IAED;;;;;OAKG;IACH,SAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAQ1E;IAED;;;;;;OAMG;IACH,SAAsB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ5F;IAED;;;;;;;OAOG;IACH,SAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAKjB;IAED;;OAEG;IACI,MAAM,kBAAkB,kDAAyB,CAAC;IACzD;;OAEG;IACI,MAAM,iBAAiB,iDAAwB,CAAC;IACvD;;OAEG;IACI,MAAM,WAAW,2CAAkB,CAAC;IAC3C;;OAEG;IACI,MAAM,SAAS,yCAAgB,CAAC;IACvC;;OAEG;IACI,MAAM,SAAS,yCAAgB,CAAC;CACxC"}

View File

@@ -0,0 +1,305 @@
/**
* These values can be used to define how sessions work on iOS.
* @platform ios
*/
export declare enum FileSystemSessionType {
/**
* Using this mode means that the downloading/uploading session on the native side will work even if the application is moved to background.
* If the task completes while the application is in background, the Promise will be either resolved immediately or (if the application execution has already been stopped) once the app is moved to foreground again.
* > Note: The background session doesn't fail if the server or your connection is down. Rather, it continues retrying until the task succeeds or is canceled manually.
*/
BACKGROUND = 0,
/**
* Using this mode means that downloading/uploading session on the native side will be terminated once the application becomes inactive (e.g. when it goes to background).
* Bringing the application to foreground again would trigger Promise rejection.
*/
FOREGROUND = 1
}
export declare enum FileSystemUploadType {
/**
* The file will be sent as a request's body. The request can't contain additional data.
*/
BINARY_CONTENT = 0,
/**
* An [RFC 2387-compliant](https://www.ietf.org/rfc/rfc2387.txt) request body. The provided file will be encoded into HTTP request.
* This request can contain additional data represented by [`UploadOptionsMultipart`](#uploadoptionsmultipart) type.
*/
MULTIPART = 1
}
export type DownloadOptions = {
/**
* If `true`, include the MD5 hash of the file in the returned object. Provided for convenience since it is common to check the integrity of a file immediately after downloading.
* @default false
*/
md5?: boolean;
cache?: boolean;
/**
* An object containing all the HTTP header fields and their values for the download network request. The keys and values of the object are the header names and values respectively.
*/
headers?: Record<string, string>;
/**
* A session type. Determines if tasks can be handled in the background. On Android, sessions always work in the background and you can't change it.
* @default FileSystemSessionType.BACKGROUND
* @platform ios
*/
sessionType?: FileSystemSessionType;
};
export type FileSystemHttpResult = {
/**
* An object containing all the HTTP response header fields and their values for the download network request.
* The keys and values of the object are the header names and values respectively.
*/
headers: Record<string, string>;
/**
* The HTTP response status code for the download network request.
*/
status: number;
mimeType: string | null;
};
export type FileSystemDownloadResult = FileSystemHttpResult & {
/**
* A `file://` URI pointing to the file. This is the same as the `fileUri` input parameter.
*/
uri: string;
/**
* Present if the `md5` option was truthy. Contains the MD5 hash of the file.
*/
md5?: string;
};
/**
* @deprecated Use `FileSystemDownloadResult` instead.
*/
export type DownloadResult = FileSystemDownloadResult;
export type FileSystemUploadOptions = (UploadOptionsBinary | UploadOptionsMultipart) & {
/**
* An object containing all the HTTP header fields and their values for the upload network request.
* The keys and values of the object are the header names and values respectively.
*/
headers?: Record<string, string>;
/**
* The request method.
* @default FileSystemAcceptedUploadHttpMethod.POST
*/
httpMethod?: FileSystemAcceptedUploadHttpMethod;
/**
* A session type. Determines if tasks can be handled in the background. On Android, sessions always work in the background and you can't change it.
* @default FileSystemSessionType.BACKGROUND
* @platform ios
*/
sessionType?: FileSystemSessionType;
};
/**
* Upload options when upload type is set to binary.
*/
export type UploadOptionsBinary = {
/**
* Upload type determines how the file will be sent to the server.
* Value will be `FileSystemUploadType.BINARY_CONTENT`.
*/
uploadType?: FileSystemUploadType;
};
/**
* Upload options when upload type is set to multipart.
*/
export type UploadOptionsMultipart = {
/**
* Upload type determines how the file will be sent to the server.
* Value will be `FileSystemUploadType.MULTIPART`.
*/
uploadType: FileSystemUploadType;
/**
* The name of the field which will hold uploaded file. Defaults to the file name without an extension.
*/
fieldName?: string;
/**
* The MIME type of the provided file. If not provided, the module will try to guess it based on the extension.
*/
mimeType?: string;
/**
* Additional form properties. They will be located in the request body.
*/
parameters?: Record<string, string>;
};
export type FileSystemUploadResult = FileSystemHttpResult & {
/**
* The body of the server response.
*/
body: string;
};
export type FileSystemNetworkTaskProgressCallback<T extends DownloadProgressData | UploadProgressData> = (data: T) => void;
/**
* @deprecated use `FileSystemNetworkTaskProgressCallback<DownloadProgressData>` instead.
*/
export type DownloadProgressCallback = FileSystemNetworkTaskProgressCallback<DownloadProgressData>;
export type DownloadProgressData = {
/**
* The total bytes written by the download operation.
*/
totalBytesWritten: number;
/**
* The total bytes expected to be written by the download operation. A value of `-1` means that the server did not return the `Content-Length` header
* and the total size is unknown. Without this header, you won't be able to track the download progress.
*/
totalBytesExpectedToWrite: number;
};
export type UploadProgressData = {
/**
* The total bytes sent by the upload operation.
*/
totalBytesSent: number;
/**
* The total bytes expected to be sent by the upload operation.
*/
totalBytesExpectedToSend: number;
};
export type DownloadPauseState = {
/**
* The remote URI to download from.
*/
url: string;
/**
* The local URI of the file to download to. If there is no file at this URI, a new one is created. If there is a file at this URI, its contents are replaced.
*/
fileUri: string;
/**
* Object representing the file download options.
*/
options: DownloadOptions;
/**
* The string which allows the API to resume a paused download.
*/
resumeData?: string;
};
export type FileInfo =
/**
* Object returned when file exist.
*/
{
/**
* Signifies that the requested file exist.
*/
exists: true;
/**
* A URI pointing to the file. This is the same as the `fileUri` input parameter
* and preserves its scheme (for example, `file://` or `content://`).
*/
uri: string;
/**
* The size of the file in bytes.
*/
size: number;
/**
* Boolean set to `true` if this is a directory and `false` if it is a file.
*/
isDirectory: boolean;
/**
* The last modification time of the file expressed in seconds since epoch.
*/
modificationTime: number;
/**
* Present if the `md5` option was truthy. Contains the MD5 hash of the file.
*/
md5?: string;
}
/**
* Object returned when file do not exist.
*/
| {
exists: false;
uri: string;
isDirectory: false;
};
/**
* These values can be used to define how file system data is read / written.
*/
export declare enum EncodingType {
/**
* Standard encoding format.
*/
UTF8 = "utf8",
/**
* Binary, radix-64 representation.
*/
Base64 = "base64"
}
export type FileSystemAcceptedUploadHttpMethod = 'POST' | 'PUT' | 'PATCH';
export type ReadingOptions = {
/**
* The encoding format to use when reading the file.
* @default EncodingType.UTF8
*/
encoding?: EncodingType | 'utf8' | 'base64';
/**
* Optional number of bytes to skip. This option is only used when `encoding: FileSystem.EncodingType.Base64` and `length` is defined.
* */
position?: number;
/**
* Optional number of bytes to read. This option is only used when `encoding: FileSystem.EncodingType.Base64` and `position` is defined.
*/
length?: number;
};
export type WritingOptions = {
/**
* The encoding format to use when writing the file.
* @default FileSystem.EncodingType.UTF8
*/
encoding?: EncodingType | 'utf8' | 'base64';
/**
* Whether to append the contents to the end of the file or overwrite the existing file.
* @default false
*/
append?: boolean;
};
export type DeletingOptions = {
/**
* If `true`, don't throw an error if there is no file or directory at this URI.
* @default false
*/
idempotent?: boolean;
};
export type InfoOptions = {
/**
* Whether to return the MD5 hash of the file.
* @default false
*/
md5?: boolean;
};
export type RelocatingOptions = {
/**
* URI or [SAF](#saf-uri) URI to the asset, file, or directory. See [supported URI schemes](#supported-uri-schemes).
*/
from: string;
/**
* `file://` URI to the file or directory which should be its new location.
*/
to: string;
};
export type MakeDirectoryOptions = {
/**
* If `true`, don't throw an error if there is no file or directory at this URI.
* @default false
*/
intermediates?: boolean;
};
export type ProgressEvent<T> = {
uuid: string;
data: T;
};
export type FileSystemRequestDirectoryPermissionsResult =
/**
* If the permissions were not granted.
*/
{
granted: false;
}
/**
* If the permissions were granted.
*/
| {
granted: true;
/**
* The [SAF URI](#saf-uri) to the user's selected directory. Available only if permissions were granted.
*/
directoryUri: string;
};
//# sourceMappingURL=FileSystem.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FileSystem.types.d.ts","sourceRoot":"","sources":["../../src/legacy/FileSystem.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,qBAAqB;IAC/B;;;;OAIG;IACH,UAAU,IAAI;IACd;;;OAGG;IACH,UAAU,IAAI;CACf;AAED,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,cAAc,IAAI;IAClB;;;OAGG;IACH,SAAS,IAAI;CACd;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,GAAG;IAC5D;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAEtD,MAAM,MA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AAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAGF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,MAAM,MAAM,2CAA2C;AACrD;;GAEG;AACD;IACE,OAAO,EAAE,KAAK,CAAC;CAChB;AACH;;GAEG;GACD;IACE,OAAO,EAAE,IAAI,CAAC;IACd;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}

View File

@@ -0,0 +1,3 @@
export * from './FileSystem';
export * from './FileSystem.types';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}

38
node_modules/expo-file-system/build/legacy/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import { NativeModule } from 'expo-modules-core';
import { DownloadProgressData, ProgressEvent, UploadProgressData } from './FileSystem.types';
type PlatformMethod = (...args: any[]) => Promise<any>;
/**
* @hidden
*/
export type FileSystemEvents = {
'expo-file-system.downloadProgress'(event: ProgressEvent<DownloadProgressData>): void;
'expo-file-system.uploadProgress'(event: ProgressEvent<UploadProgressData>): void;
};
export declare class ExponentFileSystemModule extends NativeModule<FileSystemEvents> {
readonly documentDirectory: string | null;
readonly cacheDirectory: string | null;
readonly bundleDirectory: string | null;
readonly getInfoAsync?: PlatformMethod;
readonly readAsStringAsync?: PlatformMethod;
readonly writeAsStringAsync?: PlatformMethod;
readonly deleteAsync?: PlatformMethod;
readonly moveAsync?: PlatformMethod;
readonly copyAsync?: PlatformMethod;
readonly makeDirectoryAsync?: PlatformMethod;
readonly readDirectoryAsync?: PlatformMethod;
readonly downloadAsync?: PlatformMethod;
readonly uploadAsync?: PlatformMethod;
readonly downloadResumableStartAsync?: PlatformMethod;
readonly downloadResumablePauseAsync?: PlatformMethod;
readonly getContentUriAsync?: PlatformMethod;
readonly getFreeDiskStorageAsync?: PlatformMethod;
readonly getTotalDiskCapacityAsync?: PlatformMethod;
readonly requestDirectoryPermissionsAsync?: PlatformMethod;
readonly readSAFDirectoryAsync?: PlatformMethod;
readonly makeSAFDirectoryAsync?: PlatformMethod;
readonly createSAFFileAsync?: PlatformMethod;
readonly networkTaskCancelAsync?: PlatformMethod;
readonly uploadTaskStartAsync?: PlatformMethod;
}
export {};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/legacy/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7F,KAAK,cAAc,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mCAAmC,CAAC,KAAK,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC;IACtF,iCAAiC,CAAC,KAAK,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CACnF,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,YAAY,CAAC,gBAA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oB,CAAC,EAAE,cAAc,CAAC;CAChD"}

View File

@@ -0,0 +1,66 @@
import type { DownloadOptions, FileSystemNetworkTaskProgressCallback, DownloadProgressData, UploadProgressData, FileInfo, FileSystemDownloadResult, FileSystemUploadOptions, FileSystemUploadResult, ReadingOptions, WritingOptions, DeletingOptions, InfoOptions, RelocatingOptions, MakeDirectoryOptions } from './legacy/FileSystem.types';
/**
* @deprecated Use `new File().info` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function getInfoAsync(fileUri: string, options?: InfoOptions): Promise<FileInfo>;
/**
* @deprecated Use `new File().text()` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function readAsStringAsync(fileUri: string, options?: ReadingOptions): Promise<string>;
/**
* @deprecated Import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function getContentUriAsync(fileUri: string): Promise<string>;
/**
* @deprecated Use `new File().write()` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function writeAsStringAsync(fileUri: string, contents: string, options?: WritingOptions): Promise<void>;
/**
* @deprecated Use `new File().delete()` or `new Directory().delete()` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function deleteAsync(fileUri: string, options?: DeletingOptions): Promise<void>;
/**
* @deprecated
*/
export declare function deleteLegacyDocumentDirectoryAndroid(): Promise<void>;
/**
* @deprecated Use `new File().move()` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function moveAsync(options: RelocatingOptions): Promise<void>;
/**
* @deprecated Use `new File().copy()` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function copyAsync(options: RelocatingOptions): Promise<void>;
/**
* @deprecated Use `new Directory().create()` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function makeDirectoryAsync(fileUri: string, options?: MakeDirectoryOptions): Promise<void>;
/**
* @deprecated Use `new Directory().list()` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function readDirectoryAsync(fileUri: string): Promise<string[]>;
/**
* @deprecated Use `Paths.availableDiskSpace` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function getFreeDiskStorageAsync(): Promise<number>;
/**
* @deprecated Use `Paths.totalDiskSpace` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function getTotalDiskCapacityAsync(): Promise<number>;
/**
* @deprecated Use `File.downloadFileAsync` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function downloadAsync(uri: string, fileUri: string, options?: DownloadOptions): Promise<FileSystemDownloadResult>;
/**
* @deprecated Use `@expo/fetch` or import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function uploadAsync(url: string, fileUri: string, options?: FileSystemUploadOptions): Promise<FileSystemUploadResult>;
/**
* @deprecated Import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function createDownloadResumable(uri: string, fileUri: string, options?: DownloadOptions, callback?: FileSystemNetworkTaskProgressCallback<DownloadProgressData>, resumeData?: string): any;
/**
* @deprecated Import this method from `expo-file-system/legacy`. This method will throw in runtime.
*/
export declare function createUploadTask(url: string, fileUri: string, options?: FileSystemUploadOptions, callback?: FileSystemNetworkTaskProgressCallback<UploadProgressData>): any;
//# sourceMappingURL=legacyWarnings.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"legacyWarnings.d.ts","sourceRoot":"","sources":["../src/legacyWarnings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,qCAAqC,EACrC,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AAQnC;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEhG;AAED;;GAEG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;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,qCAAqC,CAAC,oBAAoB,CAAC,EACtE,UAAU,CAAC,EAAE,MAAM,GAClB,GAAG,CAEL;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,uBAAuB,EACjC,QAAQ,CAAC,EAAE,qCAAqC,CAAC,kBAAkB,CAAC,GACnE,GAAG,CAEL"}

View File

@@ -0,0 +1,60 @@
import type { Directory, File } from '../FileSystem';
export declare class PathUtilities {
/**
* Joins path segments into a single path.
* @param paths - An array of path segments.
* @returns A string representing the joined path.
*/
static join(...paths: (string | File | Directory)[]): string;
/**
* Resolves a relative path to an absolute path.
* @param from - The base path.
* @param to - The relative path.
* @returns A string representing the resolved path.
*/
static relative(from: string | File | Directory, to: string | File | Directory): string;
/**
* Checks if a path is absolute.
* @param path - The path to check.
* @returns `true` if the path is absolute, `false` otherwise.
*/
static isAbsolute(path: string | File | Directory): boolean;
/**
* Normalizes a path.
* @param path - The path to normalize.
* @returns A string representing the normalized path.
*/
static normalize(path: string | File | Directory): string;
/**
* Returns the directory name of a path.
* @param path - The path to get the directory name from.
* @returns A string representing the directory name.
*/
static dirname(path: string | File | Directory): string;
/**
* Returns the base name of a path.
* @param path - The path to get the base name from.
* @param ext - An optional file extension.
* @returns A string representing the base name.
*/
static basename(path: string | File | Directory, ext?: string): string;
/**
* Returns the extension of a path.
* @param path - The path to get the extension from.
* @returns A string representing the extension.
*/
static extname(path: string | File | Directory): string;
/**
* Parses a path into its components.
* @param path - The path to parse.
* @returns An object containing the parsed path components.
*/
static parse(path: string | File | Directory): {
root: string;
dir: string;
base: string;
ext: string;
name: string;
};
}
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pathUtilities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQrD,qBAAa,aAAa;IACxB;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM;IAU5D;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAevF;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO;IAQ3D;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAUzD;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAUvD;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM;IAStE;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IASvD;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG;QAC7C,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd;CAQF"}

View File

@@ -0,0 +1,26 @@
export declare function format(sep: string, pathObject: {
dir?: string;
root?: string;
base?: string;
name?: string;
ext?: string;
}): string;
export declare function resolve(...args: string[]): string;
export declare function normalize(path: string): string;
export declare function isAbsolute(path: string): boolean;
export declare function join(...args: string[]): string;
export declare function relative(from: string, to: string): string;
export declare function toNamespacedPath(path: string): string;
export declare function dirname(path: string): string;
export declare function basename(path: string, suffix?: string): string;
export declare function extname(path: string): string;
export declare function parse(path: string): {
root: string;
dir: string;
base: string;
ext: string;
name: string;
};
export declare const sep = "/";
export declare const delimiter = ":";
//# sourceMappingURL=path.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/pathUtilities/path.ts"],"names":[],"mappings":"AA2FA,wBAAgB,MAAM,CACpB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE;IACV,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GACA,MAAM,CAOR;AAED,wBAAgB,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,UA0BxC;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,UAgBrC;AACD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,WAEtC;AACD,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,UAcrC;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UA6DhD;AACD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,UAG5C;AACD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,UAoBnC;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,UAiErD;AACD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,UA+CnC;AACD,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM;;;;;;EAwEjC;AACD,eAAO,MAAM,GAAG,MAAM,CAAC;AACvB,eAAO,MAAM,SAAS,MAAM,CAAC"}

View File

@@ -0,0 +1,4 @@
export declare function encodeURLChars(path: string): string;
export declare function isUrl(url: string): boolean;
export declare function asUrl(url: string | URL): URL | null;
//# sourceMappingURL=url.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/pathUtilities/url.ts"],"names":[],"mappings":"AA2CA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,UAgB1C;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,WAMhC;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,cAQtC"}

17
node_modules/expo-file-system/build/streams.d.ts generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import type { FileHandle } from './ExpoFileSystem.types';
export declare class FileSystemReadableStreamSource implements UnderlyingByteSource {
handle: FileHandle;
size: number;
type: "bytes";
constructor(handle: FileHandle);
cancel(): void;
pull(controller: ReadableByteStreamController): void;
}
export declare class FileSystemWritableSink implements UnderlyingSink {
handle: FileHandle;
constructor(handle: FileHandle);
abort(): void;
close(): void;
write(chunk: Uint8Array): void;
}
//# sourceMappingURL=streams.d.ts.map

1
node_modules/expo-file-system/build/streams.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../src/streams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,qBAAa,8BAA+B,YAAW,oBAAoB;IACzE,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAQ;IACpB,IAAI,EAAG,OAAO,CAAU;gBAEZ,MAAM,EAAE,UAAU;IAI9B,MAAM;IAIN,IAAI,CAAC,UAAU,EAAE,4BAA4B;CA6B9C;AAED,qBAAa,sBAAuB,YAAW,cAAc;IAC3D,MAAM,EAAE,UAAU,CAAC;gBAEP,MAAM,EAAE,UAAU;IAI9B,KAAK;IAIL,KAAK;IAIL,KAAK,CAAC,KAAK,EAAE,UAAU;CAGxB"}