Ally's a QA

2007-Oct-29 - File descriptor and convention of Windows and Unix platform

When port web application to IIS, developer has to do the following conversion on his codes, so that the Unix files meet Windows convention. QA hence need to pay attention to these points too.

 

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.  

File path length limitation

Unix filename is restricted to 255 characters.

Windows file path is restricted to 259 characters.


<- Last Page :: Next Page ->

About Me

Here I share my experiences and thoughts as a QA engineer, and a place to put my notes.

Search This Blog

Categories

My thinkings
My knowledge base
My tools

Links

Home
View my profile
Archives
Friends
Email Me

Friends

whollymindless
strazzerj
syed1982
mferris
ukkuru
michaeljf
agvasqa
priyabala
srini847
spikyone
naba123
Blog Widget by LinkWithin