[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Q: file specification syntax for Win32, MacOS, UNIX?
- From: Edgar Toernig <froese@...>
- Date: Tue, 21 May 2002 00:49:48 +0200
Andreas Rozek wrote:
> For some platform-independent code, I need the syntax of file
> specifications (including volumes and folders) for Win32, Mac
> OS and UNIX platforms.
For Unix it's simple: An optional leading '/', any number of
"name/" and a trailing "name":
A leading '/' says that's it's an absolute path starting at
the process's root directory. Without a leading '/' it's a
relative path starting at the process's current directory.
"name" may consist of any characters (8-bit) except '\0'
and '/'. There may be limitations on a name's length.
A zero length name is ok and is treated as '.' (but some
systems won't accept "" as a full pathname). Names are
There are two special names: '.' is the current directory
and '..' is the parent directory.
Volumes are seen as regular directories. There's no special
syntax for them.
Some conventions found in applications (processing is done
by the apps - the kernel knows nothing about them):
Names beginning with a '.' are considered hidden. By default
they are not show when listing directories and are ignored
when matching file name patterns.
A leading "~" is considered the home directory of the process's
user. Some apps extend this to "~username" to specify the home
directory of user 'username'.
When specifying search paths the colon (':') is normally used
to separate the elements (ie .:~/bin:/bin:/usr/bin).
> Does anybody have a pointer to such information?
I would be interested too. Maybe you could post a summary.