lib.util.copy(): Support FileContext source, file types, and --parents #144
1 changed files with 4 additions and 0 deletions
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
commit
d0eca89b63
|
|
@ -112,6 +112,10 @@ class FileContext(abc.ABC):
|
||||||
def root(self) -> str:
|
def root(self) -> str:
|
||||||
return self.__uri.path
|
return self.__uri.path
|
||||||
|
|
||||||
|
@property
|
||||||
|
def chroot(self) -> bool:
|
||||||
|
return self.__chroot
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def username(self) -> str | None:
|
def username(self) -> str | None:
|
||||||
return self.__uri.username
|
return self.__uri.username
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue