navigateToDirectory method

Future<void> navigateToDirectory(
  1. String dirName
)

Navigates into a subdirectory.

Updates the current path and history, then refreshes the file list.

Implementation

Future<void> navigateToDirectory(String dirName) async {
  setState(() {
    currentPath = '$currentPath/$dirName';
    pathHistory.add(currentPath);
  });
  await refreshFiles();
  widget.onDirectoryChanged.call(currentPath);
}