Preparing search index...

    Function moveFileToCache

    • Moves a file into the app cache directory

      Use it to keep a file whose owner may delete it, such as a photo shared from another app. The file is removed with the rest of the cache by clearCache.

      $1Promise resolving to the URI of the file in the app cache, or empty string on failure

      Parameters

      • uri: string

      Returns Promise<string>

      const cachedUri = await moveFileToCache('file:///shared/photo.jpg');
      // Returns: "file:///cache/Recipedia/shared_<uuid>.jpg"