dav_file dataclass
This commit is contained in:
parent
cf684ee5f9
commit
9b969b6024
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
import logging
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
from io import BytesIO
|
||||
from typing import Any, Optional
|
||||
|
||||
|
@ -38,14 +39,14 @@ async def _get_buffer(
|
|||
return await buffer_inner(resource)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class DavFile:
|
||||
def __init__(self, remote_path: Any) -> None:
|
||||
self.__remote_path = remote_path
|
||||
remote_path: str
|
||||
|
||||
@property
|
||||
async def __buffer(self) -> BytesIO:
|
||||
return await _get_buffer(
|
||||
remote_path=self.__remote_path,
|
||||
remote_path=self.remote_path,
|
||||
ttl_hash=_get_ttl_hash(20),
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue