Add virtual IO section to the README

Mon, 27 Jul 2009 04:10:31 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 27 Jul 2009 04:10:31 +0100
changeset 42
7b1896ff4315
parent 41
4ff9ecb6f1f6
child 43
3407f006b9cb

Add virtual IO section to the README

README file | annotate | diff | comparison | revisions
--- a/README	Mon Jul 27 04:10:10 2009 +0100
+++ b/README	Mon Jul 27 04:10:31 2009 +0100
@@ -59,6 +59,15 @@
 **Note:** Minification may interfere with the line number calculation, use --minify-level=debug to enable all features of minify 
 that don't change line numbers, and everything will be fine.
 
+### Virtual IO
+Squish allows you to pack resources (any file) into the squished output. Sometimes it would be convenient to access these through 
+the standard Lua io interface. Well now you can! :)
+
+#### --virtual-io
+Inserts code into the squished output which replaces io.open, io.lines, dofile and loadfile. The new functions will first check 
+whether the specified filename matches a packed resource's name. If it does then it will operate on that resource instead of an 
+actual file. If the filename does _not_ match a resource then the function passes on to the real Lua functions.
+
 ## Squishy reference
 
 A squishy file is actually a Lua script which calls some Squish functions. These functions are listed here.

mercurial