At least we can have a function that returns the file data in a buffer, something such as:
```
unsigned char * getFileDataBuffer(const char *filePath, unsigned long *size) {
	 unsigned long size;
	 unsigned char * buffer = NSString::getFileData(filePath, "rb", &size);
	 if (size > 0) {
		 return buffer;
	} else {
		// Fill buffer with AAsset
	}
}
```

and use cases such as:
```
unsigned char *buffer = getFileData(filePath, &size);
NSString script = NSString::stringWithData(buffer, size);
```
or
```
unsigned char *buffer = getFileData(filePath, &size);
unsigned int error = lodepng_decode_memory(&origPixels, &w, &h, buffer, size, LCT_RGBA, 8);
```