time_t mtime;
r = rados_stat(io_ctx, oid, &size, &mtime);
printf("rados_stat size = %lld mtime = %d = %d\n", (long long)size, (int)mtime, r);
-
- /* tmap */
+ r = rados_stat(io_ctx, "does_not_exist", NULL, NULL);
+ printf("rados_stat(does_not_exist) = %d\n", r);
/* exec */
rados_exec(io_ctx, oid, "crypto", "md5", buf, strlen(buf) + 1, buf, 128);
uint64_t objver = io_ctx.get_last_version();
cout << "io_ctx.write returned " << r << " last_ver=" << objver << std::endl;
+ uint64_t stat_size;
+ time_t stat_mtime;
+ r = io_ctx.stat(oid, &stat_size, &stat_mtime);
+ cout << "io_ctx.stat size = " << stat_size << " mtime = " << stat_mtime << std::endl;
+
+ r = io_ctx.stat(oid, NULL, NULL);
+ cout << "io_ctx.stat(does_not_exist) = " << r;
+
uint64_t handle;
C_Watch wc;
r = io_ctx.watch(oid, objver, &handle, &wc);
cout << "xattr: " << it->first << std::endl;
}
-#if 0
r = io_ctx.remove(oid);
cout << "remove result=" << r << std::endl;
-#endif
rados.shutdown();
return 0;