in Perl.
The abs_path() function takes a single argument and returns the
-absolute pathname for that argument. It uses the same algoritm as
+absolute pathname for that argument. It uses the same algorithm as
getcwd(). (actually getcwd() is abs_path("."))
The fastcwd() function looks the same as getcwd(), but runs faster.
unshift(@path, $direntry);
}
$path = '/' . join('/', @path);
+ if ($^O eq 'apollo') { $path = "/".$path; }
# At this point $path may be tainted (if tainting) and chdir would fail.
# To be more useful we untaint it then check that we landed where we started.
$path = $1 if $path =~ /^(.*)$/; # untaint
my $start = @_ ? shift : '.';
my($dotdots, $cwd, @pst, @cst, $dir, @tst);
+ return cwd() if ( $^O =~ /cygwin/ );
+
unless (@cst = stat( $start ))
{
carp "stat($start): $!";