view 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
line wrap: on
line source


/*
 * Copyright Jordan Miner
 *
 * Distributed under the Boost Software License, Version 1.0.
 * (See accompanying file BOOST_LICENSE.txt or copy at
 * http://www.boost.org/LICENSE_1_0.txt)
 *
 */

module dynamin.core.file;

import dynamin.core.string;
import tango.io.device.File;
import tango.io.UnicodeFile;

ubyte[] readFileBytes(string file) {
	return cast(ubyte[])File.get(file);
	//scope f = new File(file);
	//return cast(ubyte[])f.read();
}
string readFileText(string file) {
	scope f = new UnicodeFile!(char)(file, Encoding.UTF_8);
	return f.read();
}