Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

VMS::FileUtils::SafeName -- convert special chars and case of filenames

VMS::FileUtils::SafeName -- convert special chars and case of filenames


NAME

VMS::FileUtils::SafeName -- convert special chars and case of filenames


Synopsis

use VMS::FileUtils::SafeName qw(:all) ;

$vmsusablename = safename('unix:..name &tc',$do_all_dots); $unixname = unsafename($vmsusablename); $path = safepath('x.y/version:1.2.3',$do_all_dots_filename); $unixpath = unsafepath($safepathoutput); $archivename = safe_archive('HTML-Parser-1.07.tar.gz');


DESCRIPTION

This package provides conversion between Unix filenames and VMS filenames where the Unix filenames may have characters that are illegal under VMS.

Spaces, punctuation, control characters, etc. get mapped to a sequence of the form '$6C'. Also the case of the original unix filename is preserved using '$' to shift from lower to uppercase:


    Unix filename       safename output

    -------------       ---------------

    abc.DEF.ghi     ->  $ABC.$DEF$5NGHI

                        ^    ^   ^^^ extra periods get converted

                        +----+-------change case

The conversion may be reversed with unsafename

The conversion provided here is the same as is contained in the Multinet and UCX NFS software.

Routines:

safename

Converts upper/lower case, punctuation etc. to chars valid for VMS filename. The first '.' in the filename is left intact (unless the second parameter to vmsify_name is true, in which case all .s are converted).

Lowercase is taken as the default for input filenames.

unsafename

Converts filenames produced by safename back to their original form.

safepath

Converts path elements into VMS-safe form. The trailing element (if the path doesn't end in a '/') can optionally have all periods converted, or (default) all but the first period converted. Path elements that correspond to directory names have all periods converted

unsafepath

Reverses the conversion done by safepath

safe_archive

Converts filename of the type typically used for CPAN archives into a VMS-compatible format:


    HTML-Parser-1.07.tar.gz  ->   HTML-Parser-1_07.tar-gz


REVISION

This document was last revised on 10 Mar 1998, for Perl 5.004.59

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy