PackFiles: Difference between revisions
Jump to navigation
Jump to search
Francoisal (talk | contribs) No edit summary |
m (typo) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
== Description == | == Description == | ||
PackFiles should return zero on success, or one of the [[error values]] otherwise. | PackFiles should return zero on success, or one of the [[Packer plugins developer errors|error values]] otherwise. | ||
* ''PackedFile'' refers to the archive that is to be created or modified. The string contains the full path. | |||
* ''SubPath'' is either NULL, when the files should be packed with the paths given with the file names, or not NULL when they should be placed below the given subdirectory within the archive. Example: | |||
SubPath="subdirectory" | SubPath="subdirectory" | ||
Name in AddList="subdir2\filename.ext" | Name in AddList="subdir2\filename.ext" | ||
-> File should be packed as "subdirectory\subdir2\filename.ext" | -> File should be packed as "subdirectory\subdir2\filename.ext" | ||
* ''SrcPath'' contains path to the files in ''AddList''. ''SrcPath'' and ''AddList'' together specify files that are to be packed into ''PackedFile''. | |||
''SrcPath'' contains path to the files in ''AddList''. ''SrcPath'' and ''AddList'' together specify files that are to be packed into ''PackedFile''. Each string in ''AddList'' is zero-delimited (ends in zero), and the ''AddList'' string ends with an extra zero byte, i.e. there are two zero bytes at the end of ''AddList''. | * Each string in ''AddList'' is zero-delimited (ends in zero), and the ''AddList'' string ends with an extra zero byte, i.e. there are two zero bytes at the end of ''AddList''. | ||
* ''Flags'' can contain a combination of the following values reflecting the user choice from within Totalcmd: | |||
''Flags'' can contain a combination of the following values reflecting the user choice from within Totalcmd: | |||
{| border="1" align="center" | {| border="1" align="center" | ||
! Constant || Value || Description | ! Constant || Value || Description | ||
Line 27: | Line 24: | ||
| PK_PACK_SAVE_PATHS || 2 || Save path names of files | | PK_PACK_SAVE_PATHS || 2 || Save path names of files | ||
|} | |} | ||
{{backlink|Packer plugins developer guide|Packer plugins developer guide}} | |||
{{back|Packer plugins developer guide overview|Packer plugins developer guide overview}} | |||
{{back|ProcessFile|ProcessFile}} | |||
{{back|GetPackerCaps|GetPackerCaps}} | |||
{{back|DeleteFiles|DeleteFiles}} |
Latest revision as of 19:57, 18 April 2006
ackFiles specifies what should happen when a user creates, or adds files to the archive.
PackFiles specifies what should happen when a user creates, or adds files to the archive.
int __stdcall PackFiles (char *PackedFile, char *SubPath, char *SrcPath, char *AddList, int Flags);
Description
PackFiles should return zero on success, or one of the error values otherwise.
- PackedFile refers to the archive that is to be created or modified. The string contains the full path.
- SubPath is either NULL, when the files should be packed with the paths given with the file names, or not NULL when they should be placed below the given subdirectory within the archive. Example:
SubPath="subdirectory" Name in AddList="subdir2\filename.ext" -> File should be packed as "subdirectory\subdir2\filename.ext"
- SrcPath contains path to the files in AddList. SrcPath and AddList together specify files that are to be packed into PackedFile.
- Each string in AddList is zero-delimited (ends in zero), and the AddList string ends with an extra zero byte, i.e. there are two zero bytes at the end of AddList.
- Flags can contain a combination of the following values reflecting the user choice from within Totalcmd:
Constant | Value | Description |
---|---|---|
PK_PACK_MOVE_FILES | 1 | Delete original after packing |
PK_PACK_SAVE_PATHS | 2 | Save path names of files |
Back to Packer plugins developer guide
Back to Packer plugins developer guide overview Back to ProcessFile Back to GetPackerCaps Back to DeleteFiles