Directory Listing
From ParaQ Wiki
Jump to navigationJump to search
Overview
This document descrides the mechanism for obtaining a server (or client) side directory listing from the Server Manager. This used to be done using vtkSMServerFileListingProxy, however the API was slow and clumpsy. It is now deprecated and is replaced by vtkPVFileInformation which is a vtkPVInformation subclass which can be gathered just like other information objects.
Usage
- Create vtkPVFileInformationHelper on the server (or client) from which we want to get the directory listing. One can create a vtkPVFileInformationHelper proxy using:
vtkSMProxy helper = vtkSMProxyManager::GetProxyManager()->NewProxy("misc", "FileInformationHelper");
- vtkPVFileInformationHelper has properties such as:
- Path (string) :- path which we want to get information about.
- DirectoryListing (bool) :- when set a directory listing is obtained in case Path is a directory.
- SpecialDirectories (bool) :- when set Path and DirecoryListing are ignored, instead a listing of special directories on the server such as My Documents, Home etc. are obtained.
- FastFileTypeDetection (bool) :- Used when obtaining directory listing. If filenames matching a particular pattern are detected, we query the system only for the file type of the first file in that sequence and assume that all others in that group have the same type.