FsContentGetSupportedField
FsContentGetSupportedField is called to enumerate all supported fields. FieldIndex is increased by 1 starting from 0 until the plugin returns ft_nomorefields.
This function is identical to the function ContentGetSupportedField in Content plugins, except that ft_fulltext isn't currently supported.
Declaration:
int __stdcall FsContentGetSupportedField(int FieldIndex,char* FieldName,
char* Units,int maxlen);
Description of parameters:
FieldIndex The index of the field for which TC requests information. Starting with 0, the FieldIndex is increased until the plugin returns an error.
FieldName Here the plugin has to return the name of the field with index FieldIndex. The field may not contain the following chars: . (dot) | (vertical line) : (colon). You may return a maximum of maxlen characters, including the trailing 0.
Units When a field supports several units like bytes, kbytes, Mbytes etc, they need to be specified here in the following form: bytes|kbytes|Mbytes . The separator is the vertical dash (Alt+0124). As field names, unit names may not contain a vertical dash, a dot, or a colon. You may return a maximum of maxlen characters, including the trailing 0.
If the field type is ft_multiplechoice, the plugin needs to return all possible values here. Example: The field "File Type" of the built-in content plugin can have the values "File", "Folder" and "Reparse point". The available choices need to be returned in the following form: File|Folder|Reparse point . The same separator is used as for Units. You may return a maximum of maxlen characters, including the trailing 0. The field type ft_multiplechoice does NOT support any units.
maxlen The maximum number of characters, including the trailing 0, which may be returned in each of the fields.
Return value:
The function needs to return one of the following values:
ft_nomorefields The FieldIndex is beyond the last available field.
ft_numeric_32 A 32-bit signed number
ft_numeric_64 A 64-bit signed number, e.g. for file sizes
ft_numeric_floating A double precision floating point number
ft_date A date value (year, month, day)
ft_time A time value (hour, minute, second). Date and time are in local time.
ft_boolean A true/false value
ft_multiplechoice A value allowing a limited number of choices. Use the Units field to return all possible values.
ft_string A text string
ft_fulltext This field is currently not supported in file system plugins.
ft_datetime A timestamp of type FILETIME, as returned e.g. by FindFirstFile(). It is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601. The time MUST be relative to universal time (Greenwich mean time) as returned by the file system, not local time!
Remarks:
Please note that fields of type ft_fulltext only show up in the search function, not in the multi-rename tool or the file lists. All fields of this type MUST be placed at the END of the field list, otherwise you will get errors in Total Commander! This is necessary because these fields will be removed from field lists e.g. in the "configure custom column view" dialog. You should use the ft_string type for shorter one line texts suitable for displaying in file lists and for renaming.