FIXED: 099 2017.5940 - vfs and svgs

I think I’m understanding how vfs works correctly in Touch, but I’m seeing an odd issue.

According to the documentation here:
http://www.derivative.ca/wiki099/index.php?title=Virtual_File_System

I have good luck with that working with most file types, but I’m not having any luck with svg files. os.path.isfile() doesn’t seem to be able to resolve a vfs path, so it’s hard to know if the file exists and the SVG top can’t see it, or if it’s not actually getting stored in the toe. :confused:

I guess my question here is:
Are SVGs an unsupported file format for vfs, or is the SVG TOP not set up to resolve vfs paths?
vfs_bug.toe (363 KB)

Thanks,
we’re having a look.
-Rob

This will be fixed in next build, but keep it mind, VFS may not be easily suited for a folder of files, if the svg file requires an embedded background image for example.
In your own attached example, when I extract the svg file as use it directly, it appears black, is that expected?

-Rob

Thanks Rob!

I’ve been thinking about this more for embedding files for icons and the like.

That’s interesting that the file is black when you extract it. I usually have to set the resolution manually on the common page of the SVG TOP. If memory serves, it should just be circles in there. I’ll double check the file when I get home to see what I did.

Follow up question - how do you extract an embedded file from vfs?

I mean to say, the output is shapes, but near black on a very dark background.

To extract an embedded file from vfs, I had to use tscript:
vfs -p oppath -x pattern -f folder I believe.

ahhhhh!

Yes yes yes, that’s correct in the image.