1 package File::Spec::Epoc;
5 use vars qw($VERSION @ISA);
9 require File::Spec::Unix;
10 @ISA = qw(File::Spec::Unix);
14 File::Spec::Epoc - methods for Epoc file specs
18 require File::Spec::Epoc; # Done internally by File::Spec if needed
22 See File::Spec::Unix for a documentation of the methods provided
23 there. This package overrides the implementation of these methods, not
26 This package is still work in progress ;-)
38 No physical check on the filesystem, but a logical cleanup of a
39 path. On UNIX eliminated successive slashes and successive "/.".
44 my ($self,$path) = @_;
46 $path =~ s|/+|/|g; # xx////xx -> xx/xx
47 $path =~ s|(/\.)+/|/|g; # xx/././xx -> xx/xx
48 $path =~ s|^(\./)+||s unless $path eq "./"; # ./xx -> xx
49 $path =~ s|^/(\.\./)+|/|s; # /../../xx -> xx
50 $path =~ s|/\Z(?!\n)|| unless $path eq "/"; # xx/ -> xx