develooper Front page | perl.perl5.porters | Postings from December 2010

VOS file name rules (was RE: perldelta naming)

Thread Previous | Thread Next
From:
Green, Paul
Date:
December 22, 2010 08:25
Subject:
VOS file name rules (was RE: perldelta naming)
Message ID:
5AA430FFE4486C448003201AC83BC85EB68A59@EXHQ.corp.stratus.com
Nicholas Clark wrote:
> However, I'm not sure what the "new" portability maxim should be. I'd
> guess
> 
> * At most one .
> * No more than 39 characters before the dot, and 39 after
> * No distinctions solely on case
> * No filenames starting with -
> 
> (If I have it correctly, the first three are VMS, and the third is
VOS.
> Everything else is less restrictive)

I can speak to the VOS file name restrictions (I work for Stratus, and I
maintain the port of perl5 to VOS). You are correct that VOS doesn't
allow file names that begin with a hyphen.  We have some additional
restrictions.  Since these email messages are archived and searchable, I
thought I would document the current set of restrictions so that they
can be found by people searching for them.  Skip to the end of this
letter if you want to avoid the details and get to my request.


These rules apply to OpenVOS Release 17.0 or later.  In earlier
releases, the rules given below for directory and link names also
applied to file names.  As far as Perl development is concerned, you
don't need to worry about the earlier releases; we are content to use
old releases of perl on old releases of VOS.

In VOS terminology, a directory, link, or file name is just the portion
of the path name that specifies the object within its containing
directory; we use the term path name to refer to the entire name down
from the root directory.

VOS rules for directory names and symbolic link names:

* ASCII only
* Case is significant
* 32 characters maximum length
* Valid characters are

	Digits
	Upper and lower alphabetics
	_ $ @ ~ [ ] { } \ | . - ^ ` : / " + ,

* The names "." and ".." are invalid
* The slash character is treated as a path name component separator by
all POSIX software so it is unwise to use it in a name

VOS rules for file names:

* ASCII only
* Case is significant
* 255 characters maximum length
* Valid characters as above, plus the following

	<space> ! ( ) ; = & '

* A file name cannot begin with a hyphen or a space
* A file name cannot end with a space
* A file name cannot consist solely of a single-quote
* A file name cannot contain the following two-character sequences
	<space><space>
	<space><hyphen>
	<space><dot>
	<dot><space>
	<single-quote><dot>
	<dot><single-quote>
* A file name cannot be "." or ".."

VOS path names rules (POSIX environment):

* 256 characters maximum length
* The slash and greater-than characters are equivalent component
separators
* The less-than character is equivalent to the "../" sequence
* The percent character or the "/%" sequence at the beginning of a path
name denotes a VOS system name
* The number-sign character denotes the start of a VOS device name
* The names "." and ".." are lexically processed to have their usual
POSIX meaning (no objects of these names ever exist)


Thus, in summary, these rules forbid that the following characters from
names:

* ASCII control characters and DEL
* The graphic characters
	% # * ? < >

Of these restrictions, the inability to put a number-sign into a file
name is the most troublesome to POSIX programs.  Due to the operation of
make and bash, one does not usually run into the other restricted
characters.  But I'd say it is fairly common for programs to try to use
a number-sign to denote a temporary file name.  That convention doesn't
work on VOS; we tend to use underscores, instead.

I respectfully request that the Perl world never use the above 6 graphic
characters in file names.

Feel free to contact me if you have questions. The VOS documentation is
located online at http://stratadoc.stratus.com. 

Thanks
PG
--
Paul Green, Senior Technical Consultant, Stratus Technologies.
Voice: +1 978-461-7557; FAX: +1 978-461-3610; Mobile: +1 (978) 235-2451;
AIM: PaulGreen





Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About