+basis::outcome huge_file::touch()
+{
+ if (filename(_real_file->name()).exists()) {
+ // file exists, so just update time.
+ int ret = utimes(_real_file->name().observe(), NIL);
+ if (ret != 0)
+ return FAILURE;
+ } else {
+ // file doesn't exist yet.
+ byte_array junk(1);
+ int written;
+ outcome ret = write(junk, written);
+ if (ret != OKAY) ret;
+ if (!truncate())
+ return FAILURE;
+ }
+ return OKAY;
+}
+