changeToParentDirectory method

  1. @override
void changeToParentDirectory()
override

Changes the current working directory to the parent directory. Implementations must handle path resolution and update the internal state correctly, including checks for navigating above the root.

Implementation

@override
void changeToParentDirectory() {
  if (currentDirectory == rootDirectory) {
    throw FileSystemException("Cannot navigate above root", currentDirectory);
  }
  final parent = p.dirname(currentDirectory);
  changeDirectory(parent);
}