Documention for: sizedir.r Created by: btiffin on: 5-May-2007 Last updated by: btiffin on: 5-May-2007 Format: text/editable Downloaded on: 19-Apr-2024 [h1 Usage document for %sizedir.r [contents [numbering-on [h2 Introduction to %sizedir.r [p This script is a handy tool that displays the total size of all %.r files in a directory. [h2 sizedir At a Glance [asis/style/font-size:75% >> 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 asis] [h2 Using %sizedir.r [p There 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. [h3 Running %sizedir.r [p This utility is simple to use. Just <strong>DO</strong> it. [asis >> do %sizedir.r asis] [p This can be executed directly from the library [asis/style/font-size:75% >> do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=sizedir.r asis] and will give you information on the %.r files in the current default directory. [h2 What you can learn [p How REBOL can return a block of filenames by using **load** on a directory specification. In this example, **load %./**. [p 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. [h2 What can break [p By 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. [h2 Credits [table/att/border="1px" [row [cell %sizedir.r [cell Original author: Unknown table] [list [li The rebol.org Library Team [li Usage document by Brian Tiffin, Library Team Apprentice, [date list]