Accessing arbitrary files from C

Lee's icon

Hi, If I add some data files to a project, e.g. plain text files, is there any way I can access the content from the C API? thx

11OLSEN's icon

Hi LEE,
I'm only guessing, have you tried accessing them like they are in the same location as the external?
I mean without using a full path.

Lee's icon

Hi, no I haven't - didn't think that would work, but maybe it's worth a try.

I was thinking though that once a project is converted to an mxf or amxd then unless there's some clever intercepting going on (is that even possible??) then the files won't exist on the filesystem, just as a resource in the file..

Edit: I've currently resorted to putting the contents I can in a dict and accessing that from C.

11OLSEN's icon

Yes everything is bundled and i think there's no absolute filesystem path to the resources but there's something like a project intern working directory at runtime I guess. And C can open files with a relative path, too.