Table of Contents |
---|
...
µC/FS File and Directory Names and Paths
Files and directories are identified by a path string; for example, a file can be opened:
Code Block | ||
---|---|---|
| ||
p_file = fs_fopen("\\test\\file001.txt", "w"); |
...
Figure - File, path and volume name lengths demonstrates these definitions.
Panel | ||||
---|---|---|---|---|
| ||||
No maximum parent name length is defined, though one may be derived. The parent name must be short enough so that the path of a file in the directory would be valid. Strictly, the minimum file name length is 1 character, though some OSs may enforce larger values (eleven on some Windows systems), thereby decreasing the maximum parent name length.
...
The constants FS_CFG_MAX_DEV_DRV_NAME_LEN
and FS_CFG_MAX_DEV_NAME_LEN
in fs_cfg.h
set the maximum length of device driver names and device names, as shown in Figure - Device and device driver name lengths. The device name is between three and five characters longer than the device driver name, since the unit number (the integer between the colons of the device name) must be between 0 and 255.
Panel | ||||
---|---|---|---|---|
| ||||
Each of the maximum name length configurations specifies the maximum string length without the NULL
character. Consequently, a buffer which holds one of these names must be one character longer than the define value.
...
RAM requirements are summarized in Table - ROM Requirements. The total depends on the number of each object allocated and the maximum sector size (set by values passed to FS_Init()
in the file system configuration structure), and various name length configuration parameters (see Name Restriction Configuration, “FS_CFG_MAX_PATH_NAME_LEN”).
Panel | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
|
§ The number of tasks that use relative path names
...