getFreeDiskSpaceForPath method

  1. @override
Future<double?> getFreeDiskSpaceForPath(
  1. String path
)
override

Implementation

@override
Future<double?> getFreeDiskSpaceForPath(String path) async {
  if (!Directory(path).existsSync()) {
    throw Exception("Specified path does not exist");
  }
  final double? freeDiskSpace = await methodChannel.invokeMethod(
    'getFreeDiskSpaceForPath',
    {"path": path},
  );
  return freeDiskSpace;
}