# CreateMemblockFromFile

## Description

Creates a memblock from a file without any processing of the file data, the memblock will be a byte for byte copy of the file. Returns an ID that can be used to reference this memblock later. You can use relative paths in the file name to read from sub folders or use SetCurrentFolder to browse there first. You can use absolute paths by adding a forward slash to the beginning of the filename, in this case the folder set with SetCurrentFolder is ignored. For example /media/file.txt will read it from the media folder even if SetCurrentFolder was used to browse to /media/somefolder

## Definition

integer CreateMemblockFromFile( filename )

UINT agk::CreateMemblockFromFile( const char* filename )

CreateMemblockFromFile( memID, filename )

void agk::CreateMemblockFromFile( UINT memID, const char* filename )

## Parameters

- filename - The name of the file to read, if it doesn't exist this will fail.
- memID - The ID of the memblock to create.