Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cant find the file i created in the app folder #90

Closed
jwiemann opened this issue Jul 8, 2022 · 2 comments
Closed

I cant find the file i created in the app folder #90

jwiemann opened this issue Jul 8, 2022 · 2 comments

Comments

@jwiemann
Copy link

jwiemann commented Jul 8, 2022

I stored a file with your flutter SDK and it worked as expected.
But now I'm trying to get this file from a native app. And somehow I cant find the file, even if my app has the same unique app name and a higher version number.

Where does this Package store it's files?

Thank you very much!

@lenlo
Copy link

lenlo commented Dec 21, 2023

The default directory for the package's files is the app's Documents directory, as returned by path_provider's getApplicationDocumentsDirectory() function. Still, it would be helpful if the package had a method that returned the full path for a store's underlying file as you may need to access it directly after using it, e.g. to rename it or to delete it when it's no longer needed.

@lesnitsky
Copy link
Owner

Storage file could be locatied in the application document directory. File name is storage-61f76cb0-842b-4318-a644-e245f50a0b5a.json.

Here's a simple script that will log the location of the storage file:

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final dir = await getApplicationDocumentsDirectory();
  final path = p.join(
    dir.path,
    'storage-61f76cb0-842b-4318-a644-e245f50a0b5a.json',
  );

  print('Storage location: $path');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants