Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (27 sloc) 1.33 KB
=begin pod
=TITLE class IO::Spec::QNX
=SUBTITLE Platform specific operations on file and directory paths QNX
class IO::Spec::QNX is IO::Spec { }
This sub-class of L<IO::Spec> specific to QNX will be
available via C<$*SPEC> if the perl is running on QNX.
B<NOTE:> the C<IO::Spec::*> classes provide low-level path operations. Unless
you're creating your own high-level path manipulation routines, you don't
need to use C<IO::Spec::*>. Use L«C<IO::Path>|/type/IO::Path» instead.
B<NOTE2:> no special validation is done by these classes (e.g. check whether
path contains a null character). It is the job of higher-level classes, like
L«C<IO::Path>|/type/IO::Path», to do that.
=head1 Methods
=head2 method canonpath
Defined as:
method canonpath(Str() $path, :$parent --> Str:D)
Returns a string that is a canonical representation of C<$path>. If C<:$parent>
is set to true, will also clean up references to parent directories. B<NOTE:>
the routine does not access the filesystem, so no symlinks are followed.
IO::Spec::QNX.canonpath("foo//../bar/../ber").say;
# OUTPUT: «foo/../bar/../ber␤»
IO::Spec::QNX.canonpath("foo///./../bar/../ber").say;
# OUTPUT: «foo/../bar/../ber␤»
IO::Spec::QNX.canonpath("foo///./../bar/../ber", :parent).say;
# OUTPUT: «ber␤»
=end pod
# vim: expandtab shiftwidth=4 ft=perl6
You can’t perform that action at this time.