That's great!  Thank you.  Now I not only have this as a tool, I have a new 
example of how to write a new protocol for rebol (which I've been having 
trouble figuring out)


   Cal Dixon
   -><-

>From: Volker Nitsch <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: [REBOL] mimetypes, loopback, object serialistion tool: minidisk
>Date: Sat, 03 Mar 2001 05:06:57 GMT
>
>REBOL [
>
>       title: "mimetypes, loopback, object serialistion tool: minidisk"
>
>       purpose: {
>
>installs a scheme ram:// which actually works as a ramdisk.
>this disk can be saved completely to a single file and restored later.
>is meant to be minimal, do deleteing and such by access to 'ram/files
>.
>output is enbase-64 compressed.
>only read/write, no open/append/close (simpler)(advanced version
>available).
>}
>       usage: {
>
>  [do %minidisk.r] read/write ram://filename stuff
>  [ram/save %your-file.r]
>  [do %yourfile.r];disk back :)
>
>  append your own startup in 'save behind 'ram/install .
>}
>       name: "minidisk"
>       file: %minidisk.r
>       author: "volker"
>]
>
>ram: context [
>
>       header: none
>       save: func [file'] [
>               system/words/save/header file' compose [
>                       ram: do decompress debase (enbase compress mold make self 
>[header:
>none])
>                       ram/install
>               ] third load mold make header [file: file' date: now]
>       ]
>       install: does [header: system/script/header net-utils/net-install
>'RAM self 9900]
>       init: func [port spec] [
>               net-utils/url-parser/parse-url port spec
>               port/locals: to file! skip spec length? to url! "RAM://"
>       ]
>       open: func [port] [
>               port/state/flags: port/state/flags or
>system/standard/port-flags/direct
>       ]
>       read: func [port data /local len] [
>               either port/locals [
>                       insert data debase select files port/locals
>                       port/locals: none
>                       length? data
>               ] [0]
>       ]
>       write: func [port data /local found] [
>               either found: find files port/locals [
>                       change next found enbase copy data
>               ] [
>                       repend files [port/locals enbase data]
>               ]
>               length? data
>       ]
>       close: func [port] []
>
>       files: copy []
>]
>
>do example: [
>       ram/install
>       ? ram
>       write ram://write.txt "hello"
>       print read ram://write.txt
>       ? ram
>       ram/save %minidisk1.r
>       print read %minidisk1.r
>       do %minidisk1.r
>;      ? ram
>]
>
>
>
>
>
>
>--
>To unsubscribe from this list, please send an email to
>[EMAIL PROTECTED] with "unsubscribe" in the
>subject, without the quotes.
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to