View script | License | Download documentation as: HTML or editable | Download script | History |
[0.049] 12.049k
Documentation for: sizedir.rUsage document for %sizedir.r1. Introduction to %sizedir.rThis script is a handy tool that displays the total size of all %.r files in a directory. 2. sizedir At a Glance>> do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=sizedir.r connecting to: www.rebol.org Script: "Total Size of .r Files" (24-Apr-1999) 58475 bytes 3. Using %sizedir.rThere are a few change that be made to this script. You could change the directory that is scanned, and the files that are included in the total. 3.1. Running %sizedir.rThis utility is simple to use. Just DO it. >> do %sizedir.r This can be executed directly from the library >> do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=sizedir.rand will give you information on the %.r files in the current default directory. 4. What you can learnHow REBOL can return a block of filenames by using load on a directory specification. In this example, load %./. The REBOL size? function returns the length of a file. Note there are complexities to this in real life, as operating system filesystems usually have allocations that don't match actual file sizes. But that is a more advanced topic. 5. What can breakBy default, REBOL security settings do not allow directory reads for most directories. Modified versions of %sizedir.r may cause a security question, unless you start up REBOL with the -s option. 6. Credits
|