Lines Matching defs:path

13 # Some regexes we use for path splitting
109 As of right now, this returns 2 if the path is absolute with a
130 complete path ending with a filename
168 sub path {
169 my @path = split(';', $ENV{PATH});
170 s/"//g for @path;
171 @path = grep length, @path;
172 unshift(@path, ".");
173 return @path;
179 path. On UNIX eliminated successive slashes and successive "/.".
196 ($volume,$directories,$file) = File::Spec->splitpath( $path );
197 ($volume,$directories,$file) = File::Spec->splitpath( $path,
200 Splits a path into volume, directory, and filename portions. Assumes that
201 the last file is a path unless the path ends in '\\', '\\.', '\\..'
203 ( $volume, $path, '' ).
209 The results can be passed to L</catpath> to get back a path equivalent to
210 (usually identical to) the original path.
215 my ($self,$path, $nofile) = @_;
218 $path =~
224 $path =~
244 $directories must be only the directory portion of the path on systems
245 that have the concept of a volume or that have path syntax that differentiates
284 Takes volume, directory and file portions and returns an entire path. Under
324 my ($self,$path,$base ) = @_;
326 my $is_abs = $self->file_name_is_absolute($path);
329 return $self->canonpath( $path ) if $is_abs == 2;
334 return $self->canonpath( $vol . $path );
338 $base = Cwd::getdcwd( ($self->splitpath( $path ))[0] ) if defined &Cwd::getdcwd ;
349 ($self->splitpath( $path, 1 ))[1,2] ;
354 $path = $self->catpath(
360 return $self->canonpath( $path ) ;
384 sub _canon_cat # @path -> path
397 my $path = join "\\", $first, @rest;
399 $path =~ tr#\\/#\\\\#s; # xx/yy --> xx\yy & xx\\yy --> xx\yy
402 $path =~ s{(?:
411 while ( $path =~ s{(?:
421 $path =~ s#\A\\##; # \xx --> xx NOTE: this is *not* root
422 $path =~ s#\\\z##; # xx\ --> xx
426 $path =~ s{ \A # at begin
433 if $path eq ""
436 return $path ne "" || $volume ? $volume.$path : ".";