DF_NUMBER_FILES_SUPPORTED
See Also: Get_Attribute, Set_Attribute, DF_FILE_REVISION, DF_FILELIST_NAME
The maximum number of slots that will fit in the filelist (either 255 or 4095).
Level
Global
Type
Integer, temporary
Access
Read only
Values
- 255
- 4095
Remarks
As of DataFlex 7 and DataFlex 3.2, each filelist supports 4095 files, while prior revisions supported only 255.
Example
The sample procedure below uses the DF_NUMBER_FILES_SUPPORTED attribute and the filelist attributes to create a new empty filelist.
Procedure NewEntry Handle hTable String sRoot String sDisplay String sTable
Set_Attribute DF_FILE_ROOT_NAME Of hTable To sRoot
Set_Attribute DF_FILE_DISPLAY_NAME Of hTable To sDisplay
Set_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
End_Procedure // NewEntry
Procedure CreateNewFilelist String sNewList
Handle hoWorkspace
String sPath
Integer iMaxSlots
//*** Make sure new filelist goes into the first folder of datapath
Get phoWorkspace Of ghoApplication To hoWorkspace
Get psDataPath Of hoWorkspace To sPath
Get PathAtIndex Of hoWorkspace sPath 1 To sPath
If (Right(sPath, 1) <> Sysconf(Sysconf_Dir_Separator)) ;
Move (sPath - Sysconf(Sysconf_Dir_Separator)) To sPath
Move (sPath - sNewList) To sPath
//*** Create the disk file
Direct_Output sPath
Write "filelist.cfg"
Close_output
//*** Use the disk file as filelist
Set_Attribute DF_FILELIST_NAME To sPath
//*** Create all the slots
Get_Attribute DF_NUMBER_FILES_SUPPORTED To iMaxSlots
Send NewEntry iMaxSlots "" "" ""
End_Procedure // CreateNewFilelist