Remote File Browser

From ParaQ Wiki
Revision as of 11:08, 11 October 2005 by Tshead (talk | contribs)
Jump to navigationJump to search

Requirements

  • Grouping of animation files to improve responsiveness of the UI
  • Store / retrieve user favorites
  • Local and remote file browsing
  • Enter paths manually
  • Display a list of parents to the current directory
  • Provide quick access to "special" folders, e.g. "Home", "Desktop", "My Favorites", etc.
  • Multiselect related files, e.g. separate geometry and attribute files
  • Display additional file attributes, e.g. size, create date, modify date, etc

Optional Requirements

  • Provide create directory / delete / rename functionality?
  • File previewing?

File browser design

Currently, the "Hello World" client defines an abstract interface for file-browsing back-ends, class pqFileDialogModel. The two implementations of pqFileDialogModel are pqLocalFileDialogModel and pqServerFileDialogModel, which implement the required functionality for browsing the local host and a connected PVS server, respectively.

pqFileDialog is the Qt user interface component that is the "front end" for pqFileDialogModel, providing a common graphical user interface for both local and remote file browsing:

File browser.png

  • The left-hand pane provides a server-specific list of "special" folders (e.g. Windows drives, "Home", "Desktop", "My Favorites", etc).
  • The right-hand pane displays the contents of the currently-visible directory. Related files (e.g. numbered animation files) can be grouped and expanded/collapsed to decrease clutter and make the UI more responsive.
  • Users can drag-and-drop files and directories from the right-hand pane to the left-hand pane, where they will be retained as "favorites".
  • The "Look in" combo-box lists the parent directories of the currently-visible directory, allowing rapid navigation "upwards" in the filesystem.
  • Users may use the "File name" line entry to select files through manual entry. The user may enter absolute or relative paths. Relative paths are interpreted relative to the currently visible directory.

Remote File Browser API

The following pseudocode operations will need to be implemented by the vtkPVServerFileListing API to support the above requirements:

  • GetCurrentWorkingDirectory - unchanged
  • GetFileListing - instead of returning a list of directories and a list of files, return a list of directories and a list of "file groups". A file group may contain one-to-many files and is represented by a label and a file count
  • GetFileGroup - returns the list of files (one-to-many) contained within a given group. Returns filename, file size, and last modification date for each file.
  • GetFavorites - returns a list of favorite directories / files. Returns an absolute path and label for each directory / file.
  • AddFavorite - stores a label & absolute path on the server side in per-user storage as a user "favorite". The label acts as a unique key.
  • DeleteFavorite - deletes a favorite path from server side per-user storage. A label is supplied as a unique key.

The following operations will need to be implemented by the vtkPVServerFileListing API to support optional requirements:

  • CreateDirectory - takes an absolute path as input and creates a new directory on the server.
  • Remove - takes an absolute path as input and deletes a directory / file.
  • Move - takes two absolute paths as input and renames the given directory / file.
  • Read - takes an absolute path, a file offset, and a buffer length as input and reads the given range of data from a file.