 |
Changeset 3547
- Timestamp:
- 06/03/08 16:24:43
(6 months ago)
- Author:
- kris
- Message:
migrated FileConst? module to tango.io.model.IFile
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2913 |
r3547 |
|
| 2 | 2 | private import tango.io.Console, |
|---|
| 3 | 3 | tango.io.FileScan, |
|---|
| 4 | | tango.io.FileConst; |
|---|
| | 4 | tango.io.model.IFile; |
|---|
| 5 | 5 | |
|---|
| 6 | 6 | /******************************************************************************* |
|---|
| r3033 |
r3547 |
|
| 3 | 3 | import tango.io.FileSystem; |
|---|
| 4 | 4 | import tango.io.FilePath; |
|---|
| 5 | | import tango.io.FileConst; |
|---|
| | 5 | import tango.io.model.IFile; |
|---|
| 6 | 6 | |
|---|
| 7 | 7 | import tango.io.Stdout; |
|---|
| r3546 |
r3547 |
|
| 25 | 25 | tango.io.FilePath, |
|---|
| 26 | 26 | tango.io.FileScan, |
|---|
| 27 | | tango.io.FileConst, |
|---|
| 28 | 27 | tango.io.FileSystem, |
|---|
| 29 | 28 | tango.io.FileConduit, |
|---|
| r3208 |
r3547 |
|
| 109 | 109 | --- |
|---|
| 110 | 110 | |
|---|
| 111 | | See File, FilePath, FileConst, FileScan, and FileSystem for |
|---|
| | 111 | See File, FilePath, FileScan, and FileSystem for |
|---|
| 112 | 112 | additional functionality related to file manipulation. |
|---|
| 113 | 113 | |
|---|
| r3267 |
r3547 |
|
| 13 | 13 | module tango.io.FileConst; |
|---|
| 14 | 14 | |
|---|
| 15 | | /******************************************************************************* |
|---|
| | 15 | public import tango.io.model.IFile : FileConst; |
|---|
| 16 | 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 | | FileSeparatorChar = '.', |
|---|
| 32 | | PathSeparatorChar = '/', |
|---|
| 33 | | SystemPathChar = ';', |
|---|
| 34 | | } |
|---|
| 35 | | |
|---|
| 36 | | static const char[] ParentDirString = ".."; |
|---|
| 37 | | static const char[] CurrentDirString = "."; |
|---|
| 38 | | static const char[] FileSeparatorString = "."; |
|---|
| 39 | | static const char[] PathSeparatorString = "/"; |
|---|
| 40 | | static const char[] SystemPathString = ";"; |
|---|
| 41 | | |
|---|
| 42 | | static const char[] NewlineString = "\r\n"; |
|---|
| 43 | | } |
|---|
| 44 | | |
|---|
| 45 | | version (Posix) |
|---|
| 46 | | { |
|---|
| 47 | | enum : char |
|---|
| 48 | | { |
|---|
| 49 | | CurrentDirChar = '.', |
|---|
| 50 | | FileSeparatorChar = '.', |
|---|
| 51 | | PathSeparatorChar = '/', |
|---|
| 52 | | SystemPathChar = ':', |
|---|
| 53 | | } |
|---|
| 54 | | |
|---|
| 55 | | static const char[] ParentDirString = ".."; |
|---|
| 56 | | static const char[] CurrentDirString = "."; |
|---|
| 57 | | static const char[] FileSeparatorString = "."; |
|---|
| 58 | | static const char[] PathSeparatorString = "/"; |
|---|
| 59 | | static const char[] SystemPathString = ":"; |
|---|
| 60 | | |
|---|
| 61 | | static const char[] NewlineString = "\n"; |
|---|
| 62 | | } |
|---|
| 63 | | } |
|---|
| | 17 | pragma (msg, "tango.io.FileConst is being migrated - please import tango.io.model.IFile instead"); |
|---|
| r3519 |
r3547 |
|
| 28 | 28 | private import tango.io.Path; |
|---|
| 29 | 29 | |
|---|
| 30 | | private import tango.io.FileConst; |
|---|
| | 30 | private import tango.io.model.IFile : FileConst; |
|---|
| 31 | 31 | |
|---|
| 32 | 32 | private import tango.core.Exception : IllegalArgumentException; |
|---|
| r2667 |
r3547 |
|
| 14 | 14 | module tango.io.protocol.Writer; |
|---|
| 15 | 15 | |
|---|
| 16 | | private import tango.io.Buffer, |
|---|
| 17 | | tango.io.FileConst; |
|---|
| 18 | | |
|---|
| 19 | | public import tango.io.model.IBuffer, |
|---|
| | 16 | private import tango.io.Buffer; |
|---|
| | 17 | |
|---|
| | 18 | public import tango.io.model.IFile, |
|---|
| | 19 | tango.io.model.IBuffer, |
|---|
| 20 | 20 | tango.io.model.IConduit; |
|---|
| 21 | 21 | |
|---|
| r2929 |
r3547 |
|
| 13 | 13 | module tango.io.vfs.VirtualFolder; |
|---|
| 14 | 14 | |
|---|
| 15 | | private import tango.io.FileConst; |
|---|
| 16 | | |
|---|
| 17 | 15 | private import tango.util.PathUtil; |
|---|
| 18 | 16 | |
|---|
| 19 | 17 | private import tango.core.Exception; |
|---|
| | 18 | |
|---|
| | 19 | private import tango.io.model.IFile; |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | private import tango.io.vfs.model.Vfs; |
|---|
| r3427 |
r3547 |
|
| 16 | 16 | |
|---|
| 17 | 17 | private import tango.io.FilePath, |
|---|
| 18 | | tango.io.FileConst, |
|---|
| 19 | 18 | tango.io.FileSystem; |
|---|
| 20 | 19 | |
|---|
| 21 | 20 | private import tango.core.Exception; |
|---|
| | 21 | |
|---|
| | 22 | private import tango.io.model.IFile; |
|---|
| 22 | 23 | |
|---|
| 23 | 24 | private import Text = tango.text.Util; |
|---|
| r3435 |
r3547 |
|
| 7 | 7 | module tango.sys.Process; |
|---|
| 8 | 8 | |
|---|
| 9 | | private import tango.io.FileConst; |
|---|
| | 9 | private import tango.io.model.IFile; |
|---|
| 10 | 10 | private import tango.io.Console; |
|---|
| 11 | 11 | private import tango.io.Buffer; |
|---|
| r2721 |
r3547 |
|
| 15 | 15 | private import tango.io.Buffer, |
|---|
| 16 | 16 | tango.io.FilePath, |
|---|
| 17 | | tango.io.FileConst, |
|---|
| 18 | 17 | tango.io.FileConduit; |
|---|
| | 18 | |
|---|
| | 19 | private import tango.io.model.IFile; |
|---|
| 19 | 20 | |
|---|
| 20 | 21 | private import Text = tango.text.Util; |
|---|
| r3527 |
r3547 |
|
| 16 | 16 | |
|---|
| 17 | 17 | private import tango.io.Buffer, |
|---|
| 18 | | tango.io.FileConst, |
|---|
| 19 | 18 | tango.io.FileConduit; |
|---|
| 20 | 19 | |
|---|
| 21 | | private import tango.io.model.IConduit; |
|---|
| | 20 | private import tango.io.model.IFile, |
|---|
| | 21 | tango.io.model.IConduit; |
|---|
| 22 | 22 | |
|---|
| 23 | 23 | /******************************************************************************* |
|---|
| r3485 |
r3547 |
|
| 16 | 16 | |
|---|
| 17 | 17 | private import tango.io.FilePath, |
|---|
| 18 | | tango.io.FileConst, |
|---|
| 19 | 18 | tango.io.FileConduit; |
|---|
| 20 | 19 | |
|---|
| 21 | | private import tango.io.model.IBuffer; |
|---|
| | 20 | private import tango.io.model.IFile, |
|---|
| | 21 | tango.io.model.IBuffer; |
|---|
| 22 | 22 | |
|---|
| 23 | 23 | private import tango.util.log.Log, |
|---|
Download in other formats:
|
 |
 |
|
 |
Copyright © 2006-2008 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic