readDir static method

FutureResult<ReadDir, IoError> readDir(
  1. Path path
)

Returns a list with the entries within a directory.

Implementation

static FutureResult<ReadDir, IoError> readDir(Path path) async {
  return await Fs.ioGuard(() async {
    return await Directory(path.asString())
        .list(recursive: false, followLinks: false)
        .toList();
  });
}