Lines Matching defs:path

30 path. On UNIX eliminates successive slashes and successive "/.".
32 $cpath = File::Spec->canonpath( $path ) ;
44 my ($self,$path) = @_;
45 return unless defined $path;
56 && ( $path =~ s{^(//[^/]+)/?\z}{}s || $path =~ s{^(//[^/]+)/}{/}s ) ) {
60 # $path =~ s|/+|/|g unless ($^O eq 'cygwin');
64 $path =~ s|/{2,}|/|g; # xx////xx -> xx/xx
65 $path =~ s{(?:/\.)+(?:/|\z)}{/}g; # xx/././xx -> xx/xx
66 $path =~ s|^(?:\./)+||s unless $path eq "./"; # ./xx -> xx
67 $path =~ s|^/(?:\.\./)+|/|; # /../../xx -> xx
68 $path =~ s|^/\.\.$|/|; # /.. -> /
69 $path =~ s|/\z|| unless $path eq "/"; # xx/ -> xx
70 return "$node$path";
76 Concatenate two or more directory names to form a complete path ending
94 complete path ending with a filename
186 # If possible, return a full path, rather than '.' or 'lib', but
235 Takes as argument a path and returns true if it is an absolute path.
248 =item path
254 sub path {
256 my @path = split(':', $ENV{PATH});
257 foreach (@path) { $_ = '.' if $_ eq '' }
258 return @path;
274 ($volume,$directories,$file) = File::Spec->splitpath( $path );
275 ($volume,$directories,$file) = File::Spec->splitpath( $path,
278 Splits a path into volume, directory, and filename portions. On systems
282 assumes that the last file is a path unless $no_file is true or a
284 true makes this return ( '', $path, '' ).
288 The results can be passed to L</catpath()> to get back a path equivalent to
289 (usually identical to) the original path.
294 my ($self,$path, $nofile) = @_;
299 $directory = $path;
302 $path =~ m|^ ( (?: .* / (?: \.\.?\z )? )? ) ([^/]*) |xs;
317 $directories must be only the directory portion of the path on systems
318 that have the concept of a volume or that have path syntax that differentiates
342 Takes volume, directory and file portions and returns an entire path. Under
368 Takes a destination path and an optional base path returns a relative path
369 from the base path to the destination path:
371 $rel_path = File::Spec->abs2rel( $path ) ;
372 $rel_path = File::Spec->abs2rel( $path, $base ) ;
380 $base filename. Otherwise all path components are assumed to be
383 If $path is relative, it is converted to absolute form using L</rel2abs()>.
397 my($self,$path,$base) = @_;
400 ($path, $base) = map $self->canonpath($_), $path, $base;
405 if (grep $self->file_name_is_absolute($_), $path, $base) {
406 ($path, $base) = map $self->rel2abs($_), $path, $base;
408 my ($path_volume) = $self->splitpath($path, 1);
412 return $path unless $path_volume eq $base_volume;
414 $path_directories = ($self->splitpath($path, 1))[1];
426 $path_directories = $self->catdir($wd, $path);
447 # @basechunks now contains the directories the resulting relative path
477 Converts a relative path to an absolute path.
479 $abs_path = File::Spec->rel2abs( $path ) ;
480 $abs_path = File::Spec->rel2abs( $path, $base ) ;
488 the $base filename. Otherwise all path components are assumed to be
491 If $path is absolute, it is cleaned up and returned using L</canonpath()>.
502 my ($self,$path,$base ) = @_;
504 # Clean up $path
505 if ( ! $self->file_name_is_absolute( $path ) ) {
518 $path = $self->catdir( $base, $path ) ;
521 return $self->canonpath( $path ) ;
543 my($fs, $path) = @_;
548 my($vol, $dirs, $file) = $fs->splitpath($path);