Mercurial > projects > dynamin
annotate dynamin/core/file.d @ 103:73060bc3f004
Change license to Boost 1.0 and MPL 2.0.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Tue, 15 May 2012 22:06:02 -0500 |
parents | aa4efef0f0b1 |
children | acdbb30fee7e |
rev | line source |
---|---|
0 | 1 |
2 /* | |
103
73060bc3f004
Change license to Boost 1.0 and MPL 2.0.
Jordan Miner <jminer7@gmail.com>
parents:
0
diff
changeset
|
3 * Copyright Jordan Miner |
0 | 4 * |
103
73060bc3f004
Change license to Boost 1.0 and MPL 2.0.
Jordan Miner <jminer7@gmail.com>
parents:
0
diff
changeset
|
5 * Distributed under the Boost Software License, Version 1.0. |
73060bc3f004
Change license to Boost 1.0 and MPL 2.0.
Jordan Miner <jminer7@gmail.com>
parents:
0
diff
changeset
|
6 * (See accompanying file BOOST_LICENSE.txt or copy at |
73060bc3f004
Change license to Boost 1.0 and MPL 2.0.
Jordan Miner <jminer7@gmail.com>
parents:
0
diff
changeset
|
7 * http://www.boost.org/LICENSE_1_0.txt) |
0 | 8 * |
9 */ | |
10 | |
11 module dynamin.core.file; | |
12 | |
13 import dynamin.core.string; | |
14 import tango.io.device.File; | |
15 import tango.io.UnicodeFile; | |
16 | |
17 ubyte[] readFileBytes(string file) { | |
18 return cast(ubyte[])File.get(file); | |
19 //scope f = new File(file); | |
20 //return cast(ubyte[])f.read(); | |
21 } | |
22 string readFileText(string file) { | |
23 scope f = new UnicodeFile!(char)(file, Encoding.UTF_8); | |
24 return f.read(); | |
25 } | |
26 |