...
µ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.
Anchor |
---|
| Figure - File, path and volume name lengths |
---|
| Figure - File, path and volume name lengths |
---|
|
Panel |
---|
borderWidth | 0 |
---|
title | Figure - File, path and volume name lengths |
---|
|
|
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.
Anchor |
---|
| Figure - Device and device driver name lengths |
---|
| Figure - Device and device driver name lengths |
---|
|
Panel |
---|
borderWidth | 0 |
---|
title | Figure - Device and device driver name lengths |
---|
|
Image Added |
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 - RAM characteristics. 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”).
Anchor |
---|
| Table - RAM characteristics |
---|
| Table - RAM characteristics |
---|
|
Panel |
---|
borderWidth | 0 |
---|
title | Table - RAM characteristics |
---|
|
Item | RAM (bytes) |
---|
Core | 932
| Per device | 40 + FS_CFG_MAX_DEV_NAME_LEN
| Per volume | 148 + FS_CFG_MAX_VOL_NAME_LEN
| Per file | 140
| Per directory | 98
| Per buffer | 34 + MaxSectorSize
| Per device driver | 8 bytes
| Working directories | ((FS_CFG_MAX_PATH_NAME_LEN * 2) + 8) * TaskCnt§
|
|
§ The number of tasks that use relative path names
...