lib.FileContext.chroot: Add property
Give FileContext a read-only property to access self.__chroot, so a caller holding a context can predict whether the addresses it passes in are relative to the URI path or absolute. Signed-off-by: Jan Lindemann <jan@janware.com> Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.0.1
This commit is contained in:
parent
9abeb4ebca
commit
d0eca89b63
1 changed files with 4 additions and 0 deletions
|
|
@ -112,6 +112,10 @@ class FileContext(abc.ABC):
|
|||
def root(self) -> str:
|
||||
return self.__uri.path
|
||||
|
||||
@property
|
||||
def chroot(self) -> bool:
|
||||
return self.__chroot
|
||||
|
||||
@property
|
||||
def username(self) -> str | None:
|
||||
return self.__uri.username
|
||||
|
|
|
|||
Loading…
Reference in a new issue