readDirSync static method

Result<ReadDir, IoError> readDirSync(
  1. Path path
)

Returns a list with the entries within a directory.

Implementation

static Result<ReadDir, IoError> readDirSync(Path path) {
  return Fs.ioGuardSync(() {
    return Directory(path.asString())
        .listSync(recursive: false, followLinks: false);
  });
}