typeSync method Null safety

FileSystemEntityType typeSync(
  1. String path,
  2. {bool followLinks = true}
)

Synchronously finds the type of file system object that a path points to.

Returns FileSystemEntityType.link only if followLinks is false and if path points to a link.

Returns FileSystemEntityType.notFound if path does not point to a file system object or if any other error occurs in looking up the path.

Implementation

static FileSystemEntityType typeSync(String path, {bool followLinks = true}) {
  return _getTypeSync(_toUtf8Array(path), followLinks);
}