Commit 0776ac8e authored by Geoff Simmons's avatar Geoff Simmons

Document the .id() method.

parent 8c9b7615
......@@ -35,6 +35,7 @@ SYNOPSIS
BYTES <obj>.size()
TIME <obj>.mtime()
DURATION <obj>.next_check()
BLOB <obj>.id()
# VMOD version
STRING file.version()
......@@ -457,7 +458,19 @@ Example::
BLOB xreader.id()
-----------------
XXX ...
Returns a unique, opaque identifier for the state of the file as
determined when it was most recently checked. The ID changes if and
only if the file was found to have changed.
Example::
import blob;
set resp.http.ETag = blob.encode(BASE64, blob=rdr.id());
The contents of the BLOB returned by ``.id()`` are intentionally not
documented, and should not be relied on to extract information about
the file.
.. _file.version():
......
......@@ -31,6 +31,7 @@ SYNOPSIS
BYTES <obj>.size()
TIME <obj>.mtime()
DURATION <obj>.next_check()
BLOB <obj>.id()
# VMOD version
STRING file.version()
......@@ -413,7 +414,19 @@ Example::
$Method BLOB .id()
XXX ...
Returns a unique, opaque identifier for the state of the file as
determined when it was most recently checked. The ID changes if and
only if the file was found to have changed.
Example::
import blob;
set resp.http.ETag = blob.encode(BASE64, blob=rdr.id());
The contents of the BLOB returned by ``.id()`` are intentionally not
documented, and should not be relied on to extract information about
the file.
$Function STRING version()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment