ctFILELIST Manage file-specific cache features. Short Name ctFILELIST() Type Utility Function Declaration NINT ctFILELIST(pTEXT filnam, pLONG pvalue, pLONG pmember, NINT state, NINT action) Description ctFILELIST() manages the advanced file-specific cache capabilities for standalone and bound server applications. ctFILELIST() must be called prior to the creation or opening of filnam for the cache capabilities to take effect. If multi-byte file names are supported (e.g., Unicode), the configuration information (or direct call to ctFILELIST()) must have the file names in UTF8 form (i.e., a NULL terminated string). The state parameter determines which cache capability is invoked, with pvalue and pmember providing supplemental information, as shown in the table below (which assumes the action ctADDfilelist):
The action parameter can be used to add a file to a list, check or change the values associated with a file on a list, or to remove a file from a list. Changes made to an open file have no effect until the next time the file is opened.
Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example TEXT filnam = “custmast.dat”; LONG bytes = 4000000; NINT rcN = 0; COUNT rc2 = 0;
if (rcN = ctFILELIST(&filnam, &bytes, NULL, ctSPLCACHElist, ctADDfilelist)) errorReturn(rcN, “Error on SPLCACHE assignment”);
if (rcN = ctFILELIST(filnam, &bytes, NULL, ctPRICACHElist, ctADDfilelist)) errorReturn(rcN, “Error on SPLCACHE assignment”));
if (rc2 = OpenFileWithResource(-1, &filnam, ctSHARED)) errorReturn(rc2, “Error opening file.”); Limitations The ctFILELIST() processing, used to store and retrieve cache parameters, ignores the mirrored portion of a file name. Only the primary file is cached. See also |
||||||||||||||||||||||||||||||||||