isRootDirectory method

Future<bool> isRootDirectory()

return true if current directory is the root. false, if the current directory not on root of the stogare.

Implementation

Future<bool> isRootDirectory() async {
  final List<Directory> storageList = (await FileManager.getStorageList());
  return (storageList
      .where((element) => element.path == Directory(_path.value).path)
      .isNotEmpty);
}