=over 2
-=item canonpath
+=item canonpath()
No physical check on the filesystem, but a logical cleanup of a
path.
$cpath = File::Spec->canonpath( $path ) ;
-=item catdir
+=item catdir()
Concatenate two or more directory names to form a complete path ending
with a directory. But remove the trailing slash from the resulting
directory names (C<''>) can be returned, because these are significant
on some OSs (e.g. MacOS).
-=item catpath
+=item catpath()
Takes volume, directory and file portions and returns an entire path. Under
Unix, $volume is ignored, and directory and file are catenated. A '/' is
$rel_path = File::Spec->abs2rel( $path ) ;
$rel_path = File::Spec->abs2rel( $path, $base ) ;
-If $base is not present or '', then L<cwd()> is used. If $base is relative,
+If $base is not present or '', then L<cwd()|Cwd> is used. If $base is relative,
then it is converted to absolute form using L</rel2abs()>. This means that it
-is taken to be relative to L<cwd()>.
+is taken to be relative to L<cwd()|Cwd>.
On systems with the concept of a volume, this assumes that both paths
are on the $destination volume, and ignores the $base volume.
directories.
If $path is relative, it is converted to absolute form using L</rel2abs()>.
-This means that it is taken to be relative to L<cwd()>.
+This means that it is taken to be relative to L<cwd()|Cwd>.
No checks against the filesystem are made on most systems. On MacOS,
the filesystem may be consulted (see
Based on code written by Shigio Yamaguchi.
-=item rel2abs
+=item rel2abs()
Converts a relative path to an absolute path.
$abs_path = File::Spec->rel2abs( $path ) ;
$abs_path = File::Spec->rel2abs( $path, $base ) ;
-If $base is not present or '', then L<cwd()> is used. If $base is relative,
+If $base is not present or '', then L<cwd()|Cwd> is used. If $base is relative,
then it is converted to absolute form using L</rel2abs()>. This means that it
-is taken to be relative to L<cwd()>.
+is taken to be relative to L<cwd()|Cwd>.
On systems with the concept of a volume, this assumes that both paths
are on the $base volume, and ignores the $path volume.
return undef;
}
-=item canonpath
+=item canonpath()
No physical check on the filesystem, but a logical cleanup of a
path. On UNIX eliminated successive slashes and successive "/.".
=item splitdir
-The opposite of L</catdir()>.
+The opposite of L<catdir()|File::Spec/catdir()>.
@dirs = File::Spec->splitdir( $directories );
$rel_path = File::Spec->abs2rel( $destination ) ;
$rel_path = File::Spec->abs2rel( $destination, $base ) ;
-If $base is not present or '', then L</cwd()> is used. If $base is relative,
+If $base is not present or '', then L<cwd()|Cwd> is used. If $base is relative,
then it is converted to absolute form using L</rel2abs()>. This means that it
-is taken to be relative to L<cwd()>.
+is taken to be relative to L<cwd()|Cwd>.
On systems with the concept of a volume, this assumes that both paths
are on the $destination volume, and ignores the $base volume.
directories.
If $path is relative, it is converted to absolute form using L</rel2abs()>.
-This means that it is taken to be relative to L</cwd()>.
+This means that it is taken to be relative to L<cwd()|Cwd>.
Based on code written by Shigio Yamaguchi.
) ;
}
-=item rel2abs
+=item rel2abs()
Converts a relative path to an absolute path.
$abs_path = File::Spec->rel2abs( $destination ) ;
$abs_path = File::Spec->rel2abs( $destination, $base ) ;
-If $base is not present or '', then L<cwd()> is used. If $base is relative,
+If $base is not present or '', then L<cwd()|Cwd> is used. If $base is relative,
then it is converted to absolute form using L</rel2abs()>. This means that it
-is taken to be relative to L</cwd()>.
+is taken to be relative to L<cwd()|Cwd>.
Assumes that both paths are on the $base volume, and ignores the
$destination volume.
return $path;
}
-=item catdir
+=item catdir()
Concatenate two or more directory names to form a path separated by colons
(":") ending with a directory. Automatically puts a trailing ":" on the
}
-=item catpath
+=item catpath()
$path = File::Spec->catpath($volume,$directory,$file);
=over 2
-=item canonpath
+=item canonpath()
No physical check on the filesystem, but a logical cleanup of a
path. On UNIX eliminates successive slashes and successive "/.".
return "$node$path";
}
-=item catdir
+=item catdir()
Concatenate two or more directory names to form a complete path ending
with a directory. But remove the trailing slash from the resulting
}
-=item catpath
+=item catpath()
Takes volume, directory and file portions and returns an entire path. Under
Unix, $volume is ignored, and directory and file are catenated. A '/' is
$rel_path = File::Spec->abs2rel( $path ) ;
$rel_path = File::Spec->abs2rel( $path, $base ) ;
-If $base is not present or '', then L<cwd()> is used. If $base is relative,
+If $base is not present or '', then L<cwd()|Cwd> is used. If $base is relative,
then it is converted to absolute form using L</rel2abs()>. This means that it
-is taken to be relative to L<cwd()>.
+is taken to be relative to L<cwd()|Cwd>.
On systems with the concept of a volume, this assumes that both paths
are on the $destination volume, and ignores the $base volume.
directories.
If $path is relative, it is converted to absolute form using L</rel2abs()>.
-This means that it is taken to be relative to L<cwd()>.
+This means that it is taken to be relative to L<cwd()|Cwd>.
No checks against the filesystem are made on most systems. On MacOS,
the filesystem may be consulted (see
return $self->canonpath( $path ) ;
}
-=item rel2abs
+=item rel2abs()
Converts a relative path to an absolute path.
$abs_path = File::Spec->rel2abs( $path ) ;
$abs_path = File::Spec->rel2abs( $path, $base ) ;
-If $base is not present or '', then L<cwd()> is used. If $base is relative,
+If $base is not present or '', then L<cwd()|Cwd> is used. If $base is relative,
then it is converted to absolute form using L</rel2abs()>. This means that it
-is taken to be relative to L<cwd()>.
+is taken to be relative to L<cwd()|Cwd>.
On systems with the concept of a volume, this assumes that both paths
are on the $base volume, and ignores the $path volume.
=item splitdir
-The opposite of L</catdir()>.
+The opposite of L<catdir()|File::Spec/catdir()>.
@dirs = File::Spec->splitdir( $directories );