ProcessName
The FSF.ProcessName function allows to perform various
actions on a file name: compare with a mask, with a list of masks
or to generate new file name using the mask.
int WINAPI ProcessName( const char *Param1, char *Param2, DWORD Flags );
Parameters
Param1
Depends on the Flags value.
Param2
Depends on the Flags value.
Flags
Specifies a command that can be one of the following values (PROCESSNAME_FLAGS enum):
Action | Description |
---|---|
PN_CMPNAME | Compares a file name with the specified mask. This flag works like the CmpName function - Param1 corresponds to Pattern, Param2 corresponds to String. In case of success TRUE is returned. |
PN_CMPNAMELIST | Compares a file name with a list of masks delimited by commas. This flag works like PN_CMPNAME, but Param1 contains the list of masks. Note that this function doesn't support exclude masks that were first implemented in FAR 1.70 beta 4. |
PN_SKIPPATH | This flag is a modifier for the PN_CMPNAME and PN_CMPNAMELIST flags. It specifies that the path to the file name must be ignored when comparing. |
PN_GENERATENAME | Generates a file name based on the name contained in Param1 and a mask contained in Param2. The result is returned in Param2. In case of success TRUE is returned, otherwise FALSE. If there is a necessity to process only a part of Param1, there is a possibility to specify a size of this part (up to 255) by combining it with PN_GENERATENAME, for example: Param1 contains "dir1\\file1" but the user wants to change only "dir1", then flags must contain PN_GENERATENAME|4. |
Return value
The return value depends on the Flags parameter.