Index: trunk/src/io/c_file_system.cc
===================================================================
--- trunk/src/io/c_file_system.cc	(revision 428)
+++ trunk/src/io/c_file_system.cc	(revision 438)
@@ -11,4 +11,5 @@
 using namespace nv;
 
+
 c_file_system::c_file_system()
 {
@@ -21,7 +22,7 @@
 }
 
-bool c_file_system::exists( const char* fpath )
+bool c_file_system::exists( const string_view& fpath )
 {
-	FILE* file = ::fopen( fpath, "rb" );
+	FILE* file = ::fopen( fpath.data(), "rb" );
 	if ( !file )
 	{
@@ -32,12 +33,23 @@
 }
 
-stream* c_file_system::open( const char* fpath, const char* fmode /*= "rb" */ )
+stream* c_file_system::open( const string_view& fpath, const string_view& fmode /*= "rb" */ )
 {
-	NV_ASSERT( fpath != nullptr && fmode != nullptr, "Bad parameters passed to open" );
-	FILE* file = ::fopen( fpath, fmode );
+	NV_ASSERT( !fpath.empty() && !fmode.empty(), "Bad parameters passed to open" );
+	FILE* file = ::fopen( fpath.data(), fmode.data() );
 	if ( !file )
 	{
 		return nullptr;
 	}
-	return new c_stream( file, fpath );
+	return new c_stream( file, fpath.data() );
 }
+
+nv::const_string c_file_system::slurp( const string_view& path )
+{
+	stream* fstream = open( path, "rb" );
+	if ( !fstream ) return const_string();
+	uint32 size = fstream->size();
+	const_string result( nullptr, size );
+	fstream->read( const_cast<char*>( result.data() ), size, 1 );
+	delete fstream;
+	return result;
+}
