1File::Spec::Win32(3pm) Perl Programmers Reference Guide File::Spec::Win32(3pm)
2
3
4
6 File::Spec::Win32 - methods for Win32 file specs
7
9 require File::Spec::Win32; # Done internally by File::Spec if needed
10
12 See File::Spec::Unix for a documentation of the methods provided there.
13 This package overrides the implementation of these methods, not the
14 semantics.
15
16 devnull
17 Returns a string representation of the null device.
18
19 tmpdir
20 Returns a string representation of the first existing directory
21 from the following list:
22
23 $ENV{TMPDIR}
24 $ENV{TEMP}
25 $ENV{TMP}
26 SYS:/temp
27 C:\system\temp
28 C:/temp
29 /tmp
30 /
31
32 The SYS:/temp is preferred in Novell NetWare and the C:\system\temp
33 for Symbian (the File::Spec::Win32 is used also for those plat‐
34 forms).
35
36 Since Perl 5.8.0, if running under taint mode, and if the environ‐
37 ment variables are tainted, they are not used.
38
39 catfile
40 Concatenate one or more directory names and a filename to form a
41 complete path ending with a filename
42
43 canonpath
44 No physical check on the filesystem, but a logical cleanup of a
45 path. On UNIX eliminated successive slashes and successive "/.".
46 On Win32 makes
47
48 dir1\dir2\dir3\..\..\dir4 -> \dir\dir4 and even
49 dir1\dir2\dir3\...\dir4 -> \dir\dir4
50
51 splitpath
52 ($volume,$directories,$file) = File::Spec->splitpath( $path );
53 ($volume,$directories,$file) = File::Spec->splitpath( $path, $no_file );
54
55 Splits a path into volume, directory, and filename portions.
56 Assumes that the last file is a path unless the path ends in '\\',
57 '\\.', '\\..' or $no_file is true. On Win32 this means that
58 $no_file true makes this return ( $volume, $path, '' ).
59
60 Separators accepted are \ and /.
61
62 Volumes can be drive letters or UNC sharenames (\\server\share).
63
64 The results can be passed to "catpath" to get back a path equiva‐
65 lent to (usually identical to) the original path.
66
67 splitdir
68 The opposite of catdir().
69
70 @dirs = File::Spec->splitdir( $directories );
71
72 $directories must be only the directory portion of the path on sys‐
73 tems that have the concept of a volume or that have path syntax
74 that differentiates files from directories.
75
76 Unlike just splitting the directories on the separator, leading
77 empty and trailing directory entries can be returned, because these
78 are significant on some OSs. So,
79
80 File::Spec->splitdir( "/a/b/c" );
81
82 Yields:
83
84 ( '', 'a', 'b', '', 'c', '' )
85
86 catpath
87 Takes volume, directory and file portions and returns an entire
88 path. Under Unix, $volume is ignored, and this is just like cat‐
89 file(). On other OSs, the $volume become significant.
90
91 Note For File::Spec::Win32 Maintainers
92
93 Novell NetWare inherits its File::Spec behaviour from
94 File::Spec::Win32.
95
97 Copyright (c) 2004 by the Perl 5 Porters. All rights reserved.
98
99 This program is free software; you can redistribute it and/or modify it
100 under the same terms as Perl itself.
101
103 See File::Spec and File::Spec::Unix. This package overrides the imple‐
104 mentation of these methods, not the semantics.
105
106
107
108perl v5.8.8 2001-09-21 File::Spec::Win32(3pm)