1File::Spec::Win32(3pm) Perl Programmers Reference Guide File::Spec::Win32(3pm)
2
3
4

NAME

6       File::Spec::Win32 - methods for Win32 file specs
7

SYNOPSIS

9        require File::Spec::Win32; # Done internally by File::Spec if needed
10

DESCRIPTION

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
34           platforms).
35
36           Since Perl 5.8.0, if running under taint mode, and if the
37           environment variables are tainted, they are not used.
38
39       case_tolerant
40           MSWin32 case-tolerance depends on GetVolumeInformation() $ouFsFlags
41           == FS_CASE_SENSITIVE, indicating the case significance when
42           comparing file specifications.  Since XP FS_CASE_SENSITIVE is
43           effectively disabled for the NT subsubsystem.  See
44           http://cygwin.com/ml/cygwin/2007-07/msg00891.html Default: 1
45
46       file_name_is_absolute
47           As of right now, this returns 2 if the path is absolute with a
48           volume, 1 if it's absolute with no volume, 0 otherwise.
49
50       catfile
51           Concatenate one or more directory names and a filename to form a
52           complete path ending with a filename
53
54       canonpath
55           No physical check on the filesystem, but a logical cleanup of a
56           path. On UNIX eliminated successive slashes and successive "/.".
57           On Win32 makes
58
59                   dir1\dir2\dir3\..\..\dir4 -> \dir\dir4 and even
60                   dir1\dir2\dir3\...\dir4   -> \dir\dir4
61
62       splitpath
63               ($volume,$directories,$file) = File::Spec->splitpath( $path );
64               ($volume,$directories,$file) = File::Spec->splitpath( $path, $no_file );
65
66           Splits a path into volume, directory, and filename portions.
67           Assumes that the last file is a path unless the path ends in '\\',
68           '\\.', '\\..'  or $no_file is true.  On Win32 this means that
69           $no_file true makes this return ( $volume, $path, '' ).
70
71           Separators accepted are \ and /.
72
73           Volumes can be drive letters or UNC sharenames (\\server\share).
74
75           The results can be passed to "catpath" to get back a path
76           equivalent to (usually identical to) the original path.
77
78       splitdir
79           The opposite of catdir().
80
81               @dirs = File::Spec->splitdir( $directories );
82
83           $directories must be only the directory portion of the path on
84           systems that have the concept of a volume or that have path syntax
85           that differentiates files from directories.
86
87           Unlike just splitting the directories on the separator, leading
88           empty and trailing directory entries can be returned, because these
89           are significant on some OSs. So,
90
91               File::Spec->splitdir( "/a/b/c" );
92
93           Yields:
94
95               ( '', 'a', 'b', '', 'c', '' )
96
97       catpath
98           Takes volume, directory and file portions and returns an entire
99           path. Under Unix, $volume is ignored, and this is just like
100           catfile(). On other OSs, the $volume become significant.
101
102   Note For File::Spec::Win32 Maintainers
103       Novell NetWare inherits its File::Spec behaviour from
104       File::Spec::Win32.
105
107       Copyright (c) 2004,2007 by the Perl 5 Porters.  All rights reserved.
108
109       This program is free software; you can redistribute it and/or modify it
110       under the same terms as Perl itself.
111

SEE ALSO

113       See File::Spec and File::Spec::Unix.  This package overrides the
114       implementation of these methods, not the semantics.
115
116
117
118perl v5.12.4                      2011-06-20            File::Spec::Win32(3pm)
Impressum