listFiles static method
列出指定目录中的所有文件和子目录。
Implementation
static Future<List<FileSystemEntity>> listFiles(String directoryPath,
{bool recursive = false}) async {
Directory directory = Directory(directoryPath);
List<FileSystemEntity> entities =
await directory.list(recursive: recursive).toList();
return entities;
}