/
QNX.pod6
41 lines (26 loc) · 1.31 KB
/
QNX.pod6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
=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 NUL byte). It is the job of higher-level classes, like
L«C<IO::Path>|/type/IO::Path», to do that.
=head1 Methods
=head2 method canonpath
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