getFiles static method

Future<List<FileSystemEntity>> getFiles({
  1. String folderPath = "",
})

Implementation

static Future<List<FileSystemEntity>> getFiles(
    {String folderPath = ""}) async {
  var appPath = await appFolder();
  if (folderPath.startsWith("/")) {
    folderPath = folderPath.substring(1);
  }

  Directory directory = Directory("$appPath/$folderPath");
  List<FileSystemEntity> files =
      directory.listSync(recursive: true, followLinks: false);
  return files;
}