Jump to content

Question about Filesystem


tec.imp
 Share

Recommended Posts

Hey there,

 

I've just wondered if it is possible to use the Leadwerks Filesystem to actually access a "virtual" file over the "abstact" protocol.

 

What i want to achive is to access a file within my data directory through Leadwerks API and not using the native c# FileStream classes or the like.

 

PS: But as far as i see there is no file object of any kind. Is this maybe a thing we could get in a next release? It would be quite nise to access a file within an archive!

 

Thanks in advance!

 

Mfg Imp

Link to comment
Share on other sites

May be:

string filePath = Leadwerks.FileSystem.GetAbsolutePath("abstract::yourmodel.gmf")

 

It should be the absolute file path (I suspect it may run in trouble if you have more files named "youmodel.gmf" in the example, that is it may not return the path to what you expected), then you can open it with the System.IO functions.

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

Thanks ZioRed for your awnser!

 

The thing is, i was more thinking of getting direct file access to a file within an zip archive through the Leadwerks API. I mean you can load models from a archive, why not generic files ?

 

Would be a nice feature to have :)

 

 

Mfg Imp

Link to comment
Share on other sites

That function already works with any file types, I tried to use "mytestfile.pdb" and it worked (that file was in a zip archive).

 

EDIT: Oh, are you talking about working directly with the files contained in a zip archive? Well then I don't know how the engine load the files without extracting, but you can extract them or try to achieve the same result without extract.

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...