path_provider_foundation
2.6.0, released 10 months ago by flutter.dev
iOS/macOS implementation of path_provider using direct FFI calls
What it does
Provides platform-specific directories such as application documents, cache, temporary, and support directories for iOS and macOS. It replaces the older Flutter‑plugin based implementation with direct Foundation calls.
AI-written summary of version 2.6.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need file system paths on iOS or macOS
- You are using the path_provider plugin and want the native implementation
Skip it when
- You are already using path_provider and do not import this package directly
Strengths
- Direct FFI for potentially better performance
- Up-to-date SDK support (Flutter 3.38.4/Dart 3.10+)
- Endorsed by Flutter team
Weaknesses
- Only supports iOS and macOS
- Requires Flutter 3.38.4 or newer
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
import 'package:path_provider_foundation/path_provider_foundation.dart';
Future<void> getPaths() async {
final dir = await getApplicationDocumentsDirectory();
print(dir.path);
}Alternatives
Packages that do the same job and could replace path_provider_foundation.
- file_picker
Use the native file explorer to pick single or multiple files, directories, and save files.
93Compare - file_saver
Save files from bytes, paths, streams, and URLs across Android, iOS, Web, Windows, macOS, and Linux.
87Compare - alh_pdf_view
Show PDF files or bytes as a Flutter widget on Android and iOS.
64Compare - downloadsfolder
Retrieve download folder paths and copy files into downloads on mobile and desktop.
61Compare
Works with
Packages commonly used together with path_provider_foundation: ones it builds on, ones built on it, and its own family.
- ffipath_provider_foundation depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- objective_cpath_provider_foundation depends on itSupport library for accessing Objective C via ffigen in Flutter
- path_provider_androidSame familyAndroid implementation of the path_provider plugin for finding commonly used locations.
- path_provider_windowsSame familyWindows implementation of the path_provider plugin
- path_parsingSame familyPure Dart library for parsing SVG path strings and generating Dart path code.
- path_providerBuilt on path_provider_foundationProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- home_widgetBuilt on path_provider_foundationPlugin to send data to native home screen widgets on Android and iOS