getFileInfo method
Locate a file at the given path.
Implementation
@override
FileInfo getFileInfo(String subpath) {
var path = subpath.trim();
// Remove leading separator if present
if (path.startsWith(p.separator)) {
path = path.substring(p.separator.length);
}
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);
}