Named of files The problem of level relative paths often encountered in Windows programming:
1. Use the period (.) To separate the basic name and extension of the file in a directory. 2, the reverse slope (/) is used to separate the directory hierarchy and file name in the path. Cannot use it in the directory or file name
However, it can be used for volume labeling, such as "C: /". Note UNC name must comply with the following format: //
. The file name can include characters other than the extended character set (128-255). But it does not contain the following reserved characters: <>: "// | 4, the device named by the system cannot be used as a file name: Con, PRN, AUX, Clock $, NUL, COM1, COM2, COM3, COM4, COM5, Com6, COM7, COM8, COM9, LPT1
LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. It should also be avoided with an extension.
These file names (for example, NUL.TX7). 5, do not assume that the file name is sensitive. Consider, for example, OSCAR, OSCAR and OSCar will be considered the same
first name. 6, do not end a file name or directory name with spaces or periods. Although the underlying file system may support this type
Name, but the operating system is not supported. 7. Use the period (.) As a directory in the path to represent the current directory. For example, "./test.txt" (written in C / C ") indicates the Test.txt file in the current directory.
8. Use two consecutive periods (..) as directories in the path to represent the parent directory of the current directory. For example, "../ debug / test.txt" (written in C / C ") indicates the current directory
Test.txt under the DEBUG directory under the parent