Makes the entity tag of a file: weak ones, or strong ones.
Attributes#
| Attribute | Type | Description |
|---|---|---|
weak | bool |
Functions#
__init__#
__init__(weak) -> None| Parameter | Type | Description |
|---|---|---|
weak | bool |
from_file_info#
from_file_info(info) -> Effect[Etag]The tag of a file from its stat: its size and modification
time in milliseconds, in hex (<size>-<mtime>, mtime 0 when
unknown); weak or strong as the generator makes them. Never
fails.
| Parameter | Type | Description |
|---|---|---|
info | FileInfo |
Returns Effect[Etag]
def from_file_info(self, info: FileInfo) -> Effect[Etag]:
"""The tag of a file from its ``stat``: its size and modification
time in milliseconds, in hex (``<size>-<mtime>``, mtime ``0`` when
unknown); weak or strong as the generator makes them. Never
fails."""
return sync(lambda: self._make(value_from_file_info(info)))from_file_web#
from_file_web(file) -> Effect[Etag]The tag of a file-like value: its size and
last_modified in milliseconds, in hex (<size>-<mtime>);
weak or strong as the generator makes them. Never fails.
| Parameter | Type | Description |
|---|---|---|
file | FileLike |
Returns Effect[Etag]
def from_file_web(self, file: FileLike) -> Effect[Etag]:
"""The tag of a file-like value: its ``size`` and
``last_modified`` in milliseconds, in hex (``<size>-<mtime>``);
weak or strong as the generator makes them. Never fails."""
return sync(lambda: self._make(value_from_file_web(file)))