File Handling
Methods Introduced:
The method pfcBaseSession.ListFiles() returns a list of files in a directory, given the directory path. You can filter the list to include only files of a particular type, as specified by the file extension.
Starting with Pro/ENGINEER Wildfire 5.0 M040, the method pfcBaseSession.ListFiles() can also list instance objects when accessing Windchill workspaces or folders. A PDM location (for workspace or commonspace) must be passed as the directory path. The following options have been added in the pfcFileListOpt enumerated type:
FILE_LIST_ALL—Lists all the files. It may also include multiple versions of the same file.
FILE_LIST_LATEST—Lists only the latest version of each file.
FILE_LIST_ALL_INST—Same as the FILE_LIST_ALL option. It returns instances only for PDM locations.
FILE_LIST_LATEST_INST—Same as the FILE_LIST_LATEST option. It returns instances only for PDM locations.
The method pfcBaseSession.ListSubdirectories() returns the subdirectories in a given directory location.
Was this helpful?