getFileInfo method

  1. @override
FileInfo getFileInfo(
  1. String subpath
)
override

Locate a file at the given path.

Implementation

@override
FileInfo getFileInfo(String subpath) {
  var path = subpath.trimLeft().replaceFirst(p.separator, '');

  if (p.isRootRelative(path)) {
    return NotFoundFileInfo(path);
  }

  final fullPath = _getFullPath(path);
  if (fullPath == null) {
    return NotFoundFileInfo(path);
  }

  var fileInfo = const LocalFileSystem().file(fullPath);

  return PhysicalFileInfo(fileInfo);
}