Get File List Suite

Provides a plug-in with some file and browser functionality. More...

Data Structures

struct  PSGetFileListSuite1
 The set of routines available in Version 1 of the Get File List Suite. More...
struct  PSGetFileListSuite2
 The set of routines available in Version 2 of the Get File List Suite. More...
struct  PSGetFileListSuite3
 The set of routines available in Version 3 of the Get File List Suite. More...
struct  PSGetFileListSuite4
 The set of routines available in Version 4 of the Get File List Suite. More...
struct  PSGetFileListSuite5
 The set of routines available in Version 5 of the Get File List Suite. More...
struct  PSGetFileListSuite6
 The set of routines available in Version 6 of the Get File List Suite. More...
struct  PSGetFileListSuite7
 The set of routines available in Version 7 of the Get File List Suite. More...

Defines

#define kPSGetFileListSuite   "Photoshop GetFileList Suite for Plug-ins"
 Unique identifier for the Get File List Suite.
#define kPSGetFileListSuiteVersion1   1
 Get File List Suite Version 1.
#define kPSGetFileListSuiteVersion2   2
 Get File List Suite Version 2.
#define kPSGetFileListSuiteVersion3   3
 Get File List Suite Version 3.
#define kPSGetFileListSuiteVersion4   4
 Get File List Suite Version 4.
#define kPSGetFileListSuiteVersion5   5
 Get File List Suite Version 5.
#define kPSGetFileListSuiteVersion6   6
 Get File List Suite Version 6.
#define kPSGetFileListSuiteVersion7   7
 Get File List Suite Version 7.

Typedefs

typedef FSSpec PIGetFileListHandleType
 Gets a list of file handles from fileSpec.
typedef SPAPI SPErr(* GetFileHandleListProc )(PIActionDescriptor &des, PIGetFileListHandleType *fileSpec, bool recurse)
typedef SPAPI SPErr(* GetXPlatFileHandleListProc )(PIActionDescriptor &des, XPlatFileSpec *fileSpec, bool recurse)
 Gets a list of file handles from xPlatFileSpec as above.
typedef SPAPI SPErr(* GetBrowserNameListProc )(PIActionDescriptor &des)
 Gets a list of browser names in the Helper\Preview In folder.
typedef SPAPI SPErr(* BrowseUrlWithIndexBrowserProc )(uint16 index, const char *url)
 Browses a URL with a browser from the "Preview In" folder; the browser is chosen based on index.
typedef SPAPI SPErr(* BrowseUrlProc )(const char *url)
 Browses a url with the default browser.
typedef SPAPI SPErr(* GetBrowserFileSpecProc )(uint16 index, SPPlatformFileSpecification *fileSpec)
 Gets the SPPlatformFileSpecification for a browser.
typedef SPAPI SPErr(* GetXPlatBrowserFileSpecProc )(uint16 index, XPlatFileSpec *fileSpec)
typedef SPAPI SPErr(* GetDefaultSystemScriptProc )(int16 &script)
typedef SPAPI SPErr(* HasDoubleByteInStringProc )(const char *charString, bool &hasDoubleByte)
typedef SPAPI SPErr(* GetWebTemplateFolderSpecProc )(SPPlatformFileSpecification *fileSpec)
typedef SPAPI SPErr(* GetXPlatWebTemplateFolderSpecProc )(XPlatFileSpec *fileSpec)
typedef SPAPI SPErr(* GetWebTemplateListProc )(PIActionDescriptor &styleList, bool recurse)
typedef SPAPI SPErr(* GetWindowsFileTypesProc )(char *fileTypeList, int32 bufferSize)
typedef SPAPI SPErr(* GetMacFileTypesProc )(OSType *typeList, int32 &numTypes, int32 bufferSize)
typedef SPAPI SPErr(* GetPresetsFolderSpecProc )(SPPlatformFileSpecification *fileSpec)
typedef SPAPI SPErr(* GetXPlatPresetsFolderSpecProc )(XPlatFileSpec *fileSpec)
typedef SPAPI SPErr(* InvalidateFileBrowserCacheProc )(const SPPlatformFileSpecification *fileSpec)
typedef SPAPI SPErr(* InvalidateXPlatFileBrowserCacheProc )(const XPlatFileSpec *fileSpec)
typedef SPAPI SPErr(* GetChewableFolderSpecProc )(SPPlatformFileSpecification *folderSpec)
typedef SPAPI SPErr(* GetXPlatChewableFolderSpecProc )(XPlatFileSpec *folderSpec)
typedef SPAPI SPErr(* GetChewableFreeSpaceProc )(int64 &freeSpace)

Detailed Description

Provides a plug-in with some file and browser functionality.

The Get File List Suite is available in Adobe Photoshop 5.5 and later.

The plug-in can use the Get File List Suite to:

  • Get a list of file handles from FSSpec.
  • Get a list of browser names in the Helper\Preview In folder.
  • Browse a given url with a given index for the browsers in the "Preview In" folder.
  • Browse a url with the default browser.
  • Get the SPPlatformFileSpecification for the browser.

Accessing the Suite

The Get File List suite is referred to as:

  #define kPSGetFileListSuite           "Photoshop GetFileList Suite for Plug-ins"

There are six versions of the Get File List suite:

  #define kPSGetFileListSuiteVersion1       1
  #define kPSGetFileListSuiteVersion2       2
  #define kPSGetFileListSuiteVersion3       3
  #define kPSGetFileListSuiteVersion4       4
  #define kPSGetFileListSuiteVersion5       5
  #define kPSGetFileListSuiteVersion6       6

The suite is acquired as follows:

  PSGetFileListSuite6 *sPSGetFileList;

  // Use most recent version.
  error = sSPBasic->AcquireSuite(kPSGetFileListSuite,
                                 kPSGetFileListSuiteVersion6,    
                                 &sPSGetFileList);

  if (error) goto . . . //handle error

For PICA errors, see SPErrorCodes.h.


Define Documentation

#define kPSGetFileListSuite   "Photoshop GetFileList Suite for Plug-ins"

Unique identifier for the Get File List Suite.

Get File List Suite Version 1.

Get File List Suite Version 2.

Get File List Suite Version 3.

Get File List Suite Version 4.

Get File List Suite Version 5.

Get File List Suite Version 6.

Get File List Suite Version 7.

XPlatFileSpec version.


Typedef Documentation

typedef FSSpec PIGetFileListHandleType

Gets a list of file handles from fileSpec.

Optionally recurses subfolders of fileSpec, depending on the value of recurse.

Parameters:
des[OUT] The list of file handles, returned. This PIActionDescriptor contains a PIActionList, which consists of all the file handles in the right order. Action descriptors are read with the Action Descriptor Suite. Action lists are read with the Action List Suite.
fileSpecThe specification from which to retrieve the file handles.
recurseIndicates whether to recurse through subfolders of fileSpec. If TRUE, this routine goes through all folders and subfolders, puts all the files in a list and sorts them to remove the duplicate entries.
Returns:
Non-zero error if failure.
typedef SPAPI SPErr(* GetFileHandleListProc)(PIActionDescriptor &des, PIGetFileListHandleType *fileSpec, bool recurse)
typedef SPAPI SPErr(* GetXPlatFileHandleListProc)(PIActionDescriptor &des, XPlatFileSpec *fileSpec, bool recurse)

Gets a list of file handles from xPlatFileSpec as above.

typedef SPAPI SPErr(* GetBrowserNameListProc)(PIActionDescriptor &des)

Gets a list of browser names in the Helper\Preview In folder.

Parameters:
des[OUT] The browser names, returned in a PIActionDescriptor as ZStrings in a PIActionList. Action descriptors are read with the Action Descriptor Suite. Action lists are read with the Action List Suite.
Returns:
Non-zero error if failure.
typedef SPAPI SPErr(* BrowseUrlWithIndexBrowserProc)(uint16 index, const char *url)

Browses a URL with a browser from the "Preview In" folder; the browser is chosen based on index.

Parameters:
urlThe URL to browse.
Returns:
Non-zero error if failure.
typedef SPAPI SPErr(* BrowseUrlProc)(const char *url)

Browses a url with the default browser.

Parameters:
urlThe URL to browse.
typedef SPAPI SPErr(* GetBrowserFileSpecProc)(uint16 index, SPPlatformFileSpecification *fileSpec)

Gets the SPPlatformFileSpecification for a browser.

The browser is selected from the list of browsers available in the "Preview In" folder based on index.

Parameters:
indexThe index of the browser for which to get the file specification. The index is zero-based.
fileSpec[OUT] The platform file specification, returned.
Returns:
Non-zero error if failure.
typedef SPAPI SPErr(* GetXPlatBrowserFileSpecProc)(uint16 index, XPlatFileSpec *fileSpec)
typedef SPAPI SPErr(* GetDefaultSystemScriptProc)(int16 &script)
typedef SPAPI SPErr(* HasDoubleByteInStringProc)(const char *charString, bool &hasDoubleByte)
typedef SPAPI SPErr(* GetWebTemplateFolderSpecProc)(SPPlatformFileSpecification *fileSpec)
typedef SPAPI SPErr(* GetXPlatWebTemplateFolderSpecProc)(XPlatFileSpec *fileSpec)
typedef SPAPI SPErr(* GetWebTemplateListProc)(PIActionDescriptor &styleList, bool recurse)
typedef SPAPI SPErr(* GetWindowsFileTypesProc)(char *fileTypeList, int32 bufferSize)
typedef SPAPI SPErr(* GetMacFileTypesProc)(OSType *typeList, int32 &numTypes, int32 bufferSize)
typedef SPAPI SPErr(* GetPresetsFolderSpecProc)(SPPlatformFileSpecification *fileSpec)
typedef SPAPI SPErr(* GetXPlatPresetsFolderSpecProc)(XPlatFileSpec *fileSpec)
typedef SPAPI SPErr(* InvalidateFileBrowserCacheProc)(const SPPlatformFileSpecification *fileSpec)
typedef SPAPI SPErr(* InvalidateXPlatFileBrowserCacheProc)(const XPlatFileSpec *fileSpec)
typedef SPAPI SPErr(* GetChewableFolderSpecProc)(SPPlatformFileSpecification *folderSpec)
typedef SPAPI SPErr(* GetXPlatChewableFolderSpecProc)(XPlatFileSpec *folderSpec)
typedef SPAPI SPErr(* GetChewableFreeSpaceProc)(int64 &freeSpace)