NAME

VMS::FileUtils::Root     - convert directory paths to and from rooted logicals

SYNOPSIS

use VMS::FileUtils::Root;

$r = new VMS::FileUtils::Root 'disk:[dir1.dir2]';

$path = $r->rooted('disk:[dir1.dir2.dir3]');

$path = $r->unrooted('ROOTDIR_1:[dir3]');

DESCRIPTION

This module creates and uses rooted logical names in the /job logical name table.

new

The directory path specified can be either in VMS or Unix format; and can be either absolute (disk:[dir] or /disk/dir) or relative to the current directory ([.dir] or dir/dir2). A blank or missing path is taken to be the current directory, and a simple name (without any slashes or brackets) is taken to be a subdirectory name.

to_rooted

This routine converts a directory path into a rooted directory path, and returns the result in Unix format (without trailing '/', so it can be used in chdir).

The input directory path can be absolute, or relative based on the current directory. Input can be either VMS or Unix format.

from_rooted

This routine converts a rooted directory path to an unrooted equivalent path and returns the result in Unix format (without trailing '/').

Note that if you input a relative path, it will be taken as relative to the rooted directory. Input can be either VMS or Unix format.

The output of this routine may contain more than 8 directory levels and hence not be directly usable on VMS without conversion to a rooted path.