Mercurial > projects > ldc
comparison tango/tango/io/FileConst.d @ 132:1700239cab2e trunk
[svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.
Lots of bugfixes...
This build is not suitable for most things.
author | lindquist |
---|---|
date | Fri, 11 Jan 2008 17:57:40 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:5825d48b27d1 | 132:1700239cab2e |
---|---|
1 /******************************************************************************* | |
2 | |
3 copyright: Copyright (c) 2004 Kris Bell. All rights reserved | |
4 | |
5 license: BSD style: $(LICENSE) | |
6 | |
7 version: Initial release: March 2005 | |
8 | |
9 author: Kris | |
10 | |
11 *******************************************************************************/ | |
12 | |
13 module tango.io.FileConst; | |
14 | |
15 /******************************************************************************* | |
16 | |
17 A set of file-system specific constants for file and path | |
18 separators (chars and strings). | |
19 | |
20 Keep these constants mirrored for each OS | |
21 | |
22 *******************************************************************************/ | |
23 | |
24 struct FileConst | |
25 { | |
26 version (Win32) | |
27 { | |
28 enum : char | |
29 { | |
30 CurrentDirChar = '.', | |
31 RootSeparatorChar = ':', | |
32 FileSeparatorChar = '.', | |
33 PathSeparatorChar = '/', | |
34 SystemPathChar = ';', | |
35 } | |
36 | |
37 static const char[] ParentDirString = ".."; | |
38 static const char[] CurrentDirString = "."; | |
39 static const char[] FileSeparatorString = "."; | |
40 static const char[] RootSeparatorString = ":"; | |
41 static const char[] PathSeparatorString = "/"; | |
42 static const char[] SystemPathString = ";"; | |
43 | |
44 static const char[] NewlineString = "\r\n"; | |
45 } | |
46 | |
47 version (Posix) | |
48 { | |
49 enum : char | |
50 { | |
51 CurrentDirChar = '.', | |
52 FileSeparatorChar = '.', | |
53 PathSeparatorChar = '/', | |
54 SystemPathChar = ':', | |
55 } | |
56 | |
57 static const char[] ParentDirString = ".."; | |
58 static const char[] CurrentDirString = "."; | |
59 static const char[] FileSeparatorString = "."; | |
60 static const char[] PathSeparatorString = "/"; | |
61 static const char[] SystemPathString = ":"; | |
62 | |
63 static const char[] NewlineString = "\n"; | |
64 } | |
65 } |