Sun StorageTek 5800 System SDK Reference Manual

StoreFile

Stores a file and associated metadata on a 5800 system server.

Synopsis

     StoreFile <IP | HOST> <FILE> [OPTIONS]

Description

Stores a file and its associated metadata record. If no -m options are specified, a metadata record without user content is generated. The OID of the metadata record is printed to stdout.

Options

-m <name>=<value>

Any number of -m options can be specified. Each option specifies a single (name,value) pair.

<name> should be specified in the format <namespace>.<attribute>. Use double quotes if <value> is a string containing spaces.

-h

Print this message.

Examples

     StoreFile server /var/log/messages
     StoreFile server ~/journal
     StoreFile server myfile.jpg -m filesystem.mimetype="image/jpeg"
     StoreFile 10.152.0.12 myfile -m system.test.type_char="do re mi"
     StoreFile 10.152.0.12 myfile -m system.test.type_string="fa so la"
     StoreFile 10.152.0.12 myfile -m system.test.type_long=123
     StoreFile 10.152.0.12 myfile -m system.test.type_double=1.23
     StoreFile 10.152.0.12 myfile -m system.test.type_binary=0789abcdef
     StoreFile 10.152.0.12 myfile -m system.test.type_date=2010-10-20
     StoreFile 10.152.0.12 myfile -m system.test.type_time=23:30:29
     StoreFile 10.152.0.12 myfile \
          -m system.test.type_timestamp="2010-10-20T23:30:29.999"
     StoreFile 10.152.0.12 myfile -m name1=value1 -m name2="value 2"

Source Code

     c/examples/StoreFile.c