mirror of
https://github.com/localsend/localsend.git
synced 2026-05-19 14:26:28 -04:00
20 lines
553 B
Dart
20 lines
553 B
Dart
import 'package:localsend_app/util/native/android_saf.dart';
|
|
import 'package:logging/logging.dart';
|
|
import 'package:open_filex/open_filex.dart';
|
|
|
|
final _logger = Logger('OpenFolder');
|
|
|
|
/// Opens the selected file which is stored on the device.
|
|
Future<void> openFolder(String path) async {
|
|
if (path.startsWith('content://')) {
|
|
await openContentUri(uri: path);
|
|
return;
|
|
}
|
|
|
|
if (!path.endsWith('/')) {
|
|
path = '$path/';
|
|
}
|
|
final result = await OpenFilex.open(path);
|
|
_logger.info('Open folder result: ${result.message}, path: $path');
|
|
}
|