@@ -108,75 +108,6 @@ export class ResourceFetcher {
108108 return this . getAdapter ( ) . fetch ( callback , ...sources ) ;
109109 }
110110
111- /**
112- * Pauses an ongoing download of files.
113- *
114- * @param sources - The resource identifiers used when calling `fetch`.
115- * @returns A promise that resolves once the download is paused.
116- */
117- static async pauseFetching ( ...sources : ResourceSource [ ] ) {
118- return this . getAdapter ( ) . pauseFetching ( ...sources ) ;
119- }
120-
121- /**
122- * Resumes a paused download of files.
123- *
124- * @param sources - The resource identifiers used when calling fetch.
125- * @returns If the fetch was successful, it returns a promise which resolves to an array of local file paths for the downloaded resources (without file:// prefix).
126- * If the fetch was again interrupted by `pauseFetching` or `cancelFetching`, it returns a promise which resolves to `null`.
127- */
128- static async resumeFetching ( ...sources : ResourceSource [ ] ) {
129- return this . getAdapter ( ) . resumeFetching ( ...sources ) ;
130- }
131-
132- /**
133- * Cancels an ongoing/paused download of files.
134- *
135- * @param sources - The resource identifiers used when calling `fetch()`.
136- * @returns A promise that resolves once the download is canceled.
137- */
138- static async cancelFetching ( ...sources : ResourceSource [ ] ) {
139- return this . getAdapter ( ) . cancelFetching ( ...sources ) ;
140- }
141-
142- /**
143- * Lists all the downloaded files used by React Native ExecuTorch.
144- *
145- * @returns A promise, which resolves to an array of URIs for all the downloaded files.
146- */
147- static async listDownloadedFiles ( ) {
148- return this . getAdapter ( ) . listDownloadedFiles ( ) ;
149- }
150-
151- /**
152- * Lists all the downloaded models used by React Native ExecuTorch.
153- *
154- * @returns A promise, which resolves to an array of URIs for all the downloaded models.
155- */
156- static async listDownloadedModels ( ) {
157- return this . getAdapter ( ) . listDownloadedModels ( ) ;
158- }
159-
160- /**
161- * Deletes downloaded resources from the local filesystem.
162- *
163- * @param sources - The resource identifiers used when calling `fetch`.
164- * @returns A promise that resolves once all specified resources have been removed.
165- */
166- static async deleteResources ( ...sources : ResourceSource [ ] ) {
167- return this . getAdapter ( ) . deleteResources ( ...sources ) ;
168- }
169-
170- /**
171- * Fetches the info about files size. Works only for remote files.
172- *
173- * @param sources - The resource identifiers (URLs).
174- * @returns A promise that resolves to combined size of files in bytes.
175- */
176- static async getFilesTotalSize ( ...sources : ResourceSource [ ] ) {
177- return this . getAdapter ( ) . getFilesTotalSize ( ...sources ) ;
178- }
179-
180111 /**
181112 * Filesystem utilities for reading downloaded resources.
182113 *
0 commit comments