Yureka LogoDocs

File Explorer

The File Explorer is the primary tool for interacting with the Virtual Filesystem (VFS). It allows users to browse directories, manage files, and launch associated applications dynamically.

Core Features

  • Navigation: Supports typical browser-style navigation (NavigateTo, NavigateUp, NavigateBack, NavigateForward).
  • View Modes: Toggle between Icon Grid, List, and Details views via EFileExplorerViewMode.
  • Sorting: Sort items by Name, Size, Type, or Modified Date using EFileExplorerSortMode.
  • Selection: Supports single selection, range selection (SelectRange), and additive selection (SelectItem).
  • File Operations: Create folders (CreateFolder), rename files (RenameSelected), and delete items (DeleteSelected).
  • Dispatch System: Automatically resolves the correct application to open a file (DispatchFileToApp), which routes to UAppLauncherSubsystem::LaunchAppForFile.

Architecture & Dependencies

The File Explorer backend (UFileExplorerApp) is heavily dependent on the OS layer:

  • Virtual Filesystem Subsystem (UVirtualFilesystemSubsystem): Listens to VFS events (OnVFSNodeCreated, OnVFSNodeModified, OnVFSNodeDeleted) to keep the UI synchronized with the underlying data state. Uses FVFSNode representations.
  • App Launcher Subsystem (UAppLauncherSubsystem): Relies on the launcher to open files in their registered external applications.

Operating Modes

The controller uses EFileExplorerMode to determine behavior, allowing it to double as standard dialog windows:

  1. Standard: The full-featured standalone application.
  2. OpenFile: A simplified mode used by other apps to pick a file to load.
  3. SaveFile: A mode used to specify a destination path and filename for saving (utilizes DefaultFileName).
  4. Picker: Used when only a folder selection is required.

Technical Details

  • Controller Class: UFileExplorerApp (Inherits from UAppBase)
  • View Target: User must assign a UMG Widget to ExplorerWidgetClass.
  • Delegates Exposed to UI:
    • FOnFileExplorerPathChanged
    • FOnFileExplorerSelectionChanged
    • FOnFileExplorerViewChanged
    • FOnFileExplorerFileSelected (Critical for OpenFile / SaveFile dialog modes)

Extension Tips

To add a new "Quick Access" location to the sidebar:

  1. Open UFileExplorerApp::GetSidebarPlaces().
  2. Add your desired VFS path (e.g., /home/username/Pictures).
  3. The UI will automatically populate the sidebar with the new entry.