SPFilesSuite Struct Reference
[API Suite List]
This suite allows you to access the PICA files list.
More...
#include <SPFiles.h>
List of all members.
Public Attributes |
SPAPI SPErr(* | AllocateFileList )(SPFileListRef *fileList) |
| Creates a new file list.
|
SPAPI SPErr(* | FreeFileList )(SPFileListRef fileList) |
| Frees a file list created with AllocateFileList() , and any entries in the list.
|
SPAPI SPErr(* | AddFiles )(SPFileListRef fileList, const SPPlatformFileReference *file) |
| Adds a file or all files in a directory to a file list.
|
SPAPI SPErr(* | NewFileListIterator )(SPFileListRef fileList, SPFileListIteratorRef *iter) |
| Creates a file-list iterator object to use with NextFile() for iterating through a file list.
|
SPAPI SPErr(* | NextFile )(SPFileListIteratorRef iter, SPFileRef *file) |
| Retrieves the current file from a file list iterator, and advances the iterator.
|
SPAPI SPErr(* | DeleteFileListIterator )(SPFileListIteratorRef iter) |
| Frees a file-list iterator created with /c NewFileListIterator().
|
SPAPI SPErr(* | GetFileSpecification )(SPFileRef file, SPPlatformFileSpecification *fileSpec) |
| Retrieves the platform-specific file specification for a file.
|
SPAPI SPErr(* | GetFileReference )(SPFileRef file, SPPlatformFileReference *fileSpec) |
SPAPI SPErr(* | GetFileInfo )(SPFileRef file, SPPlatformFileInfo *info) |
| Retrieves the metadata for a file.
|
SPAPI SPErr(* | GetIsAPlugin )(SPFileRef file, SPBoolean *isAPlugin) |
| Reports whether a file in a file list is a plug-in.
|
SPAPI SPErr(* | SetIsAPlugin )(SPFileRef file, SPBoolean isAPlugin) |
| Sets whether a file in a file list is a plug-in.
|
SPAPI SPErr(* | GetFilePropertyList )(SPFileRef file, SPPropertyListRef *propertList) |
| Retrieves the property list for a file.
|
SPAPI SPErr(* | SetFilePropertyList )(SPFileRef file, SPPropertyListRef propertList) |
| Sets the property list for a file.
|
Detailed Description
This suite allows you to access the PICA files list.
This list, created at startup, contains references to every file in the application's plug-in folder, including any resolved file and folder aliases. PICA maintains this list, and uses it to find plug-ins.
Use this suite to access the plug-in file list, in order to avoid redundant directory scans. Adapters looking for their own plug-ins and PICA plug-ins looking for support files should scan the list to locate relevant files rather than walking platform directory structures on their own.
Similarly, you can use this suite to create, maintain, and access your own lists of files in a platform-independent and efficient manner.
Member Data Documentation
Adds a file or all files in a directory to a file list.
Searches a directory recursively for contained files.
- Parameters:
-
| fileList | The file list object. |
| file | The file or directory specification. |
Creates a new file list.
Typically, you use the main PICA file list to access plug-in files, available through SPRuntimeSuite::GetRuntimeFileList()
. You can use this to track other file collections. If you create a new list, you must free it when it is no longer needed, using FreeFileList()
.
- Parameters:
-
| fileList | [out] A buffer in which to return the new file list object. |
Frees a file list created with AllocateFileList()
, and any entries in the list.
- Parameters:
-
| fileList | The file list object. |
Retrieves the metadata for a file.
- Parameters:
-
| file | The file object. |
| info | [out] A buffer in which to return the file information. |
Retrieves the property list for a file.
- Parameters:
-
| file | The file object. |
| propertList | [out] A buffer in which to return the property list, or kFileDoesNotHavePiPL if the file does not have a property list, or kFileHasMulitplePiPLs if the file has multiple property lists. |
- See also:
SPPiPL.h
Retrieves the platform-specific file specification for a file.
- Parameters:
-
| file | The file object. |
| fileSpec | [out] A buffer in which to return the file specification. |
Reports whether a file in a file list is a plug-in.
- Parameters:
-
| file | The file object. |
| isAPlugin | [out] A buffer in which to return true if the file is a plug-in. |
Creates a file-list iterator object to use with NextFile()
for iterating through a file list.
The iterator is initially set to the first file in the list. When the iterator is no longer needed, free it with DeleteFileListIterator()
.
- Parameters:
-
| fileList | The file list object. |
| iter | [out] A buffer in which to return the new iterator object. |
Retrieves the current file from a file list iterator, and advances the iterator.
- Parameters:
-
| iter | The iterator object. |
| file | [out] A buffer in which to return the current file object, or NULL if the end of the list has been reached. |
Sets the property list for a file.
- Parameters:
-
| file | The file object. |
| propertList | The new property list. |
Sets whether a file in a file list is a plug-in.
- Parameters:
-
| file | The file object. |
| isAPlugin | True to mark the file as a plug-in, false to mark it as not a plug-in. |
The documentation for this struct was generated from the following file: