Changeset 29388 in project


Ignore:
Timestamp:
07/17/13 18:04:06 (6 years ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [209.234.191.51]:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/amazon-s3

    r28203 r29388  
    106106The return is unspecified.
    107107
     108==== {{put-file!}}
     109<procedure>(put-file! bucket key file-path)</procedure>
     110
     111Upload a file.
     112
     113==== {{get-file}}
     114<procedure>(get-file bucket key file-path)</procedure>
     115
     116Retrieve arbitrary item and write it to {{file-path}}.
     117
    108118==== {{get-object}}
    109119<procedure>(get-object bucket key)</procedure>
     
    126136Takes a bucket and an object key and attempts to delete the object identified by the key. If the object can't be deleted, an unspecified error will occur.
    127137
     138=== List of macros
     139
     140==== {{with-bucket}}
     141<syntax>(with-bucket bucket ...)</syntax>
     142
     143All amazon-s3 operations in the body will use the specified bucket without requiring it to be explicitly set.
     144
     145WARNING! This is still crappy and only works for direct amazon-s3 calls that start with {{bucket}}.
     146
     147<enscript type="scheme">
     148(with-bucket "foo"
     149  (put-file! "foo-file" "~/foo")
     150  (get-file "foo-file" "~/foo2"))
     151
     152(with-bucket "foo"
     153  (+ 1 2 3)) ; this will not work!
     154</enscript>
     155
    128156=== Version History
    129157
Note: See TracChangeset for help on using the changeset viewer.