#include "shared/utility.h"
#include <stdio.h>
#include <dali/integration-api/debug.h>
-#include <dali/devel-api/adaptor-framework/file-loader.h>
+#include <dali/devel-api/adaptor-framework/file-stream.h>
using namespace Dali;
using Dali::Toolkit::TextLabel;
std::string fullpath( path );
fullpath += filename;
- std::streampos bufferSize = 0;
- Dali::Vector<char> fileBuffer;
- if( !Dali::FileLoader::ReadFile( fullpath, bufferSize, fileBuffer, Dali::FileLoader::FileType::BINARY ) )
+ Dali::FileStream fileStream( fullpath, Dali::FileStream::READ | Dali::FileStream::BINARY );
+ FILE* file = fileStream.GetFile();
+ if( !file )
{
return false;
}
- FILE* file = fmemopen( &fileBuffer[0], bufferSize, "rb" );
-
bool retValue = false;
- if( ! fseek( file, 0, SEEK_END ) )
+ if( !fseek( file, 0, SEEK_END ) )
{
long int size = ftell( file );
}
}
- fclose( file );
return retValue;
}