$myfile->open("w+", "demoResc"); $bytes = $myfile->write("Hello world from Sifang!\n"); echo "{$bytes} bytes written <br/>\n"; $myfile->close(); $myfile->open("r", "demoResc", true); $str = $myfile->read(200); echo "the file reads: <pre>{$str}</pre>"; $myfile->close(); $file_src = new ProdsFile($account, "/tempZone/home/rods/test.php"); $file_dest = new ProdsFile($account, "/tempZone/home/rods/test.sifang.txt"); //$file_src->cpMeta($file_dest); foreach ($file_dest->getMeta() as $meta) { echo "{$file_dest->path_str}: {$meta->name}; {$meta->value}; {$meta->units} <br/> \n"; } $meta = array(new RODSMeta("test1", "1")); $files = ProdsPath::queryMeta($account, $meta); foreach ($files as $file) { echo "{$file} <br/>\n"; } echo "<hr/>"; $dirs = ProdsPath::queryMeta($account, $meta, 1); foreach ($dirs as $dir) { echo "{$dir} <br/>\n"; } $file = new ProdsFile($account, "/tempZone/home/rods/test.php"); var_dump($file->getStats()); echo "<br/>--- connection successful! #2--- " . microtime() . " <br/>\n"; } catch (RODSException $e) { echo $e; echo $e->showStackTrace(); }