Debian Codegraph @

upstream/mageia-cauldron/man3pm/File::Spec::Win32.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "File::Spec::Win32 3pm"
61 .TH File::Spec::Win32 3pm 2025-06-24 "perl v5.42.0" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 File::Spec::Win32 \- methods for Win32 file specs
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& require File::Spec::Win32; # Done internally by File::Spec if needed
72 .Ve
73 .SH DESCRIPTION
74 .IX Header "DESCRIPTION"
75 See File::Spec::Unix for a documentation of the methods provided
76 there. This package overrides the implementation of these methods, not
77 the semantics.
78 .IP devnull 4
79 .IX Item "devnull"
80 Returns a string representation of the null device.
81 .IP tmpdir 4
82 .IX Item "tmpdir"
83 Returns a string representation of the first existing directory
84 from the following list:
85 .Sp
86 .Vb 8
87 \& $ENV{TMPDIR}
88 \& $ENV{TEMP}
89 \& $ENV{TMP}
90 \& SYS:/temp
91 \& C:\esystem\etemp
92 \& C:/temp
93 \& /tmp
94 \& /
95 .Ve
96 .Sp
97 The SYS:/temp is preferred in Novell NetWare and the C:\esystem\etemp
98 for Symbian (the File::Spec::Win32 is used also for those platforms).
99 .Sp
100 If running under taint mode, and if the environment
101 variables are tainted, they are not used.
102 .IP case_tolerant 4
103 .IX Item "case_tolerant"
104 MSWin32 case\-tolerance depends on \fBGetVolumeInformation()\fR \f(CW$ouFsFlags\fR == FS_CASE_SENSITIVE,
105 indicating the case significance when comparing file specifications.
106 Since XP FS_CASE_SENSITIVE is effectively disabled for the NT subsubsystem.
107 See <http://cygwin.com/ml/cygwin/2007\-07/msg00891.html>
108 Default: 1
109 .IP file_name_is_absolute 4
110 .IX Item "file_name_is_absolute"
111 As of right now, this returns 2 if the path is absolute with a
112 volume, 1 if it\*(Aqs absolute with no volume, 0 otherwise.
113 .IP catfile 4
114 .IX Item "catfile"
115 Concatenate one or more directory names and a filename to form a
116 complete path ending with a filename
117 .IP canonpath 4
118 .IX Item "canonpath"
119 No physical check on the filesystem, but a logical cleanup of a
120 path. On UNIX eliminated successive slashes and successive "/.".
121 On Win32 makes
122 .Sp
123 .Vb 2
124 \& dir1\edir2\edir3\e..\e..\edir4 \-> \edir\edir4 and even
125 \& dir1\edir2\edir3\e...\edir4 \-> \edir\edir4
126 .Ve
127 .IP splitpath 4
128 .IX Item "splitpath"
129 .Vb 3
130 \& ($volume,$directories,$file) = File::Spec\->splitpath( $path );
131 \& ($volume,$directories,$file) = File::Spec\->splitpath( $path,
132 \& $no_file );
133 .Ve
134 .Sp
135 Splits a path into volume, directory, and filename portions. Assumes that
136 the last file is a path unless the path ends in \*(Aq\e\e\*(Aq, \*(Aq\e\e.\*(Aq, \*(Aq\e\e..\*(Aq
137 or \f(CW$no_file\fR is true. On Win32 this means that \f(CW$no_file\fR true makes this return
138 ( \f(CW$volume\fR, \f(CW$path\fR, \*(Aq\*(Aq ).
139 .Sp
140 Separators accepted are \e and /.
141 .Sp
142 Volumes can be drive letters or UNC sharenames (\e\eserver\eshare).
143 .Sp
144 The results can be passed to "catpath" to get back a path equivalent to
145 (usually identical to) the original path.
146 .IP splitdir 4
147 .IX Item "splitdir"
148 The opposite of \fBcatdir()\fR.
149 .Sp
150 .Vb 1
151 \& @dirs = File::Spec\->splitdir( $directories );
152 .Ve
153 .Sp
154 \&\f(CW$directories\fR must be only the directory portion of the path on systems
155 that have the concept of a volume or that have path syntax that differentiates
156 files from directories.
157 .Sp
158 Unlike just splitting the directories on the separator, leading empty and
159 trailing directory entries can be returned, because these are significant
160 on some OSs. So,
161 .Sp
162 .Vb 1
163 \& File::Spec\->splitdir( "/a/b//c/" );
164 .Ve
165 .Sp
166 Yields:
167 .Sp
168 .Vb 1
169 \& ( \*(Aq\*(Aq, \*(Aqa\*(Aq, \*(Aqb\*(Aq, \*(Aq\*(Aq, \*(Aqc\*(Aq, \*(Aq\*(Aq )
170 .Ve
171 .IP catpath 4
172 .IX Item "catpath"
173 Takes volume, directory and file portions and returns an entire path. Under
174 Unix, \f(CW$volume\fR is ignored, and this is just like \fBcatfile()\fR. On other OSs,
175 the \f(CW$volume\fR become significant.
176 .SS "Note For File::Spec::Win32 Maintainers"
177 .IX Subsection "Note For File::Spec::Win32 Maintainers"
178 Novell NetWare inherits its File::Spec behaviour from File::Spec::Win32.
179 .SH COPYRIGHT
180 .IX Header "COPYRIGHT"
181 Copyright (c) 2004,2007 by the Perl 5 Porters. All rights reserved.
182 .PP
183 This program is free software; you can redistribute it and/or modify
184 it under the same terms as Perl itself.
185 .SH "SEE ALSO"
186 .IX Header "SEE ALSO"
187 See File::Spec and File::Spec::Unix. This package overrides the
188 implementation of these methods, not the semantics.