|
Feature |
Unix Implementation |
Change to Windows Implementation |
|
Directory separator |
Forward slash (/). |
Backslash(\)。
Note: In Perl script, backslash is used as an excape character. So you have to use double backslash(\\) to indicate the backslash in a directory. |
|
File names and pathnames |
Unix supports long file name and extension with 4 characters. File name is case sensitive. |
FAT file system uses DOS 8.3 filename convention. And it's case insensitive.
NTFS is case aware, yet case insensitive. |
|
Directory hierarchy |
Unix file system appears as a single directory layer. |
Windows storage is seperated to several physical and virtual drives, each of which has a directory hierarchy. So you have to specify the drive letter(C,D,E,etc.) as part of the file path when access a Windows file. |
|
Text file line termination |
Unix only uses LF(line feed) to indicate the end of a line in text file. |
Uses both CR(carriage return) and LF to terminate a line in text file, and some applications. |
|
File desciptors/handles |
Unix file descriptors 0, 1, and 2 indicate stdin, stdout, and stderr respectively. |
Win32 uses handles instead of descriptors. Call Win32 API GetStdHandle() to confirm which handle is in use. |