Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK ! K _
_
macos.pynu [ from __future__ import annotations
import os
from .api import PlatformDirsABC
class MacOS(PlatformDirsABC):
"""
Platform directories for the macOS operating system. Follows the guidance from `Apple documentation
`_.
Makes use of the `appname ` and
`version `.
"""
@property
def user_data_dir(self) -> str:
""":return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Application Support/"))
@property
def site_data_dir(self) -> str:
""":return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``"""
return self._append_app_name_and_version("/Library/Application Support")
@property
def user_config_dir(self) -> str:
""":return: config directory tied to the user, e.g. ``~/Library/Preferences/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Preferences/"))
@property
def site_config_dir(self) -> str:
""":return: config directory shared by the users, e.g. ``/Library/Preferences/$appname``"""
return self._append_app_name_and_version("/Library/Preferences")
@property
def user_cache_dir(self) -> str:
""":return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches"))
@property
def user_state_dir(self) -> str:
""":return: state directory tied to the user, same as `user_data_dir`"""
return self.user_data_dir
@property
def user_log_dir(self) -> str:
""":return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Logs"))
@property
def user_documents_dir(self) -> str:
""":return: documents directory tied to the user, e.g. ``~/Documents``"""
return os.path.expanduser("~/Documents")
@property
def user_runtime_dir(self) -> str:
""":return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``"""
return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches/TemporaryItems"))
__all__ = [
"MacOS",
]
PK ! unix.pynu [ from __future__ import annotations
import os
import sys
from configparser import ConfigParser
from pathlib import Path
from .api import PlatformDirsABC
if sys.platform.startswith("linux"): # pragma: no branch # no op check, only to please the type checker
from os import getuid
else:
def getuid() -> int:
raise RuntimeError("should only be used on Linux")
class Unix(PlatformDirsABC):
"""
On Unix/Linux, we follow the
`XDG Basedir Spec `_. The spec allows
overriding directories with environment variables. The examples show are the default values, alongside the name of
the environment variable that overrides them. Makes use of the
`appname `,
`version `,
`multipath `,
`opinion `.
"""
@property
def user_data_dir(self) -> str:
"""
:return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
``$XDG_DATA_HOME/$appname/$version``
"""
path = os.environ.get("XDG_DATA_HOME", "")
if not path.strip():
path = os.path.expanduser("~/.local/share")
return self._append_app_name_and_version(path)
@property
def site_data_dir(self) -> str:
"""
:return: data directories shared by users (if `multipath ` is
enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
"""
# XDG default for $XDG_DATA_DIRS; only first, if multipath is False
path = os.environ.get("XDG_DATA_DIRS", "")
if not path.strip():
path = f"/usr/local/share{os.pathsep}/usr/share"
return self._with_multi_path(path)
def _with_multi_path(self, path: str) -> str:
path_list = path.split(os.pathsep)
if not self.multipath:
path_list = path_list[0:1]
path_list = [self._append_app_name_and_version(os.path.expanduser(p)) for p in path_list]
return os.pathsep.join(path_list)
@property
def user_config_dir(self) -> str:
"""
:return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
``$XDG_CONFIG_HOME/$appname/$version``
"""
path = os.environ.get("XDG_CONFIG_HOME", "")
if not path.strip():
path = os.path.expanduser("~/.config")
return self._append_app_name_and_version(path)
@property
def site_config_dir(self) -> str:
"""
:return: config directories shared by users (if `multipath `
is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
path separator), e.g. ``/etc/xdg/$appname/$version``
"""
# XDG default for $XDG_CONFIG_DIRS only first, if multipath is False
path = os.environ.get("XDG_CONFIG_DIRS", "")
if not path.strip():
path = "/etc/xdg"
return self._with_multi_path(path)
@property
def user_cache_dir(self) -> str:
"""
:return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
``~/$XDG_CACHE_HOME/$appname/$version``
"""
path = os.environ.get("XDG_CACHE_HOME", "")
if not path.strip():
path = os.path.expanduser("~/.cache")
return self._append_app_name_and_version(path)
@property
def user_state_dir(self) -> str:
"""
:return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
``$XDG_STATE_HOME/$appname/$version``
"""
path = os.environ.get("XDG_STATE_HOME", "")
if not path.strip():
path = os.path.expanduser("~/.local/state")
return self._append_app_name_and_version(path)
@property
def user_log_dir(self) -> str:
"""
:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``log`` in it
"""
path = self.user_cache_dir
if self.opinion:
path = os.path.join(path, "log")
return path
@property
def user_documents_dir(self) -> str:
"""
:return: documents directory tied to the user, e.g. ``~/Documents``
"""
documents_dir = _get_user_dirs_folder("XDG_DOCUMENTS_DIR")
if documents_dir is None:
documents_dir = os.environ.get("XDG_DOCUMENTS_DIR", "").strip()
if not documents_dir:
documents_dir = os.path.expanduser("~/Documents")
return documents_dir
@property
def user_runtime_dir(self) -> str:
"""
:return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
``$XDG_RUNTIME_DIR/$appname/$version``
"""
path = os.environ.get("XDG_RUNTIME_DIR", "")
if not path.strip():
path = f"/run/user/{getuid()}"
return self._append_app_name_and_version(path)
@property
def site_data_path(self) -> Path:
""":return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``"""
return self._first_item_as_path_if_multipath(self.site_data_dir)
@property
def site_config_path(self) -> Path:
""":return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``"""
return self._first_item_as_path_if_multipath(self.site_config_dir)
def _first_item_as_path_if_multipath(self, directory: str) -> Path:
if self.multipath:
# If multipath is True, the first path is returned.
directory = directory.split(os.pathsep)[0]
return Path(directory)
def _get_user_dirs_folder(key: str) -> str | None:
"""Return directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/"""
user_dirs_config_path = os.path.join(Unix().user_config_dir, "user-dirs.dirs")
if os.path.exists(user_dirs_config_path):
parser = ConfigParser()
with open(user_dirs_config_path) as stream:
# Add fake section header, so ConfigParser doesn't complain
parser.read_string(f"[top]\n{stream.read()}")
if key not in parser["top"]:
return None
path = parser["top"][key].strip('"')
# Handle relative home paths
path = path.replace("$HOME", os.path.expanduser("~"))
return path
return None
__all__ = [
"Unix",
]
PK ! T3 3 __pycache__/api.cpython-312.pycnu [
Cg=$ v d Z ddlmZ ddlZddlmZmZ ddlmZ ddl m
Z
e
rddlmZ ddl m
Z
G d d
e Zy)z Base API. )annotationsN)ABCabstractmethod)Path)
TYPE_CHECKING)Iterator)Literalc ~ e Zd ZdZ d/ d0dZd1dZd2dZd3dZee d4d Z
ee d4d Zee d4d Zee d4d
Z
ee d4d Zee d4d Zee d4d
Zee d4d Zee d4d Zee d4d Zee d4d Zee d4d Zee d4d Zee d4d Zee d4d Zee d4d Zed5d Zed5d Zed5d Zed5d Zed5d Zed5d Zed5d Z ed5d Z!ed5d Z"ed5d Z#ed5d! Z$ed5d" Z%ed5d# Z&ed5d$ Z'ed5d% Z(ed5d& Z)d6d'Z*d6d(Z+d6d)Z,d6d*Z-d7d+Z.d7d,Z/d7d-Z0d7d.Z1y)8PlatformDirsABCz-Abstract base class for platform directories.Nc n || _ || _ || _ || _ || _ || _ || _ y)aY
Create a new platform directory.
:param appname: See `appname`.
:param appauthor: See `appauthor`.
:param version: See `version`.
:param roaming: See `roaming`.
:param multipath: See `multipath`.
:param opinion: See `opinion`.
:param ensure_exists: See `ensure_exists`.
N)appname appauthorversionroaming multipathopinion
ensure_exists)selfr
r r r r r r s ?/opt/hc_python/lib/python3.12/site-packages/platformdirs/api.py__init__zPlatformDirsABC.__init__ sW , " # * c & t |dd }| j rB|j | j | j r|j | j t j
j |d g| }| j | |S )N r )listr
appendr ospathjoin_optionally_create_directory)r baseparamsr s r _append_app_name_and_versionz,PlatformDirsABC._append_app_name_and_versionQ sm d12h<<MM$,,'||
dll+ww||DG-f-))$/r c V | j rt | j dd y y )NT)parentsexist_ok)r r mkdirr r s r r z,PlatformDirsABC._optionally_create_directory[ s' JTD9 r c t | j r"|j t j d }t | S )Nr )r splitr pathsepr )r directorys r _first_item_as_path_if_multipathz0PlatformDirsABC._first_item_as_path_if_multipath_ s* >>!
3A6IIr c y)z(:return: data directory tied to the userN r s r
user_data_dirzPlatformDirsABC.user_data_dire r c y)z':return: data directory shared by usersNr. r/ s r
site_data_dirzPlatformDirsABC.site_data_dirj r1 r c y)z*:return: config directory tied to the userNr. r/ s r user_config_dirzPlatformDirsABC.user_config_diro r1 r c y)z-:return: config directory shared by the usersNr. r/ s r site_config_dirzPlatformDirsABC.site_config_dirt r1 r c y)z):return: cache directory tied to the userNr. r/ s r user_cache_dirzPlatformDirsABC.user_cache_diry r1 r c y)z(:return: cache directory shared by usersNr. r/ s r site_cache_dirzPlatformDirsABC.site_cache_dir~ r1 r c y)z):return: state directory tied to the userNr. r/ s r user_state_dirzPlatformDirsABC.user_state_dir r1 r c y)z':return: log directory tied to the userNr. r/ s r user_log_dirzPlatformDirsABC.user_log_dir r1 r c y)z-:return: documents directory tied to the userNr. r/ s r user_documents_dirz"PlatformDirsABC.user_documents_dir r1 r c y)z-:return: downloads directory tied to the userNr. r/ s r user_downloads_dirz"PlatformDirsABC.user_downloads_dir r1 r c y)z,:return: pictures directory tied to the userNr. r/ s r user_pictures_dirz!PlatformDirsABC.user_pictures_dir r1 r c y)z*:return: videos directory tied to the userNr. r/ s r user_videos_dirzPlatformDirsABC.user_videos_dir r1 r c y)z):return: music directory tied to the userNr. r/ s r user_music_dirzPlatformDirsABC.user_music_dir r1 r c y)z+:return: desktop directory tied to the userNr. r/ s r user_desktop_dirz PlatformDirsABC.user_desktop_dir r1 r c y)z+:return: runtime directory tied to the userNr. r/ s r user_runtime_dirz PlatformDirsABC.user_runtime_dir r1 r c y)z*:return: runtime directory shared by usersNr. r/ s r site_runtime_dirz PlatformDirsABC.site_runtime_dir r1 r c , t | j S )z#:return: data path tied to the user)r r0 r/ s r user_data_pathzPlatformDirsABC.user_data_path D&&''r c , t | j S )z":return: data path shared by users)r r3 r/ s r site_data_pathzPlatformDirsABC.site_data_path rR r c , t | j S )z%:return: config path tied to the user)r r5 r/ s r user_config_pathz PlatformDirsABC.user_config_path D(())r c , t | j S )z(:return: config path shared by the users)r r7 r/ s r site_config_pathz PlatformDirsABC.site_config_path rW r c , t | j S )z$:return: cache path tied to the user)r r9 r/ s r user_cache_pathzPlatformDirsABC.user_cache_path D''((r c , t | j S )z#:return: cache path shared by users)r r; r/ s r site_cache_pathzPlatformDirsABC.site_cache_path r\ r c , t | j S )z$:return: state path tied to the user)r r= r/ s r user_state_pathzPlatformDirsABC.user_state_path r\ r c , t | j S )z":return: log path tied to the user)r r? r/ s r
user_log_pathzPlatformDirsABC.user_log_path s D%%&&r c , t | j S )z*:return: documents a path tied to the user)r rA r/ s r user_documents_pathz#PlatformDirsABC.user_documents_path D++,,r c , t | j S )z(:return: downloads path tied to the user)r rC r/ s r user_downloads_pathz#PlatformDirsABC.user_downloads_path re r c , t | j S )z':return: pictures path tied to the user)r rE r/ s r user_pictures_pathz"PlatformDirsABC.user_pictures_path s D**++r c , t | j S )z%:return: videos path tied to the user)r rG r/ s r user_videos_pathz PlatformDirsABC.user_videos_path rW r c , t | j S )z$:return: music path tied to the user)r rI r/ s r user_music_pathzPlatformDirsABC.user_music_path r\ r c , t | j S )z&:return: desktop path tied to the user)r rK r/ s r user_desktop_pathz!PlatformDirsABC.user_desktop_path D))**r c , t | j S )z&:return: runtime path tied to the user)r rM r/ s r user_runtime_pathz!PlatformDirsABC.user_runtime_path rp r c , t | j S )z%:return: runtime path shared by users)r rO r/ s r site_runtime_pathz!PlatformDirsABC.site_runtime_path rp r c # D K | j | j yw)z4:yield: all user and site configuration directories.N)r5 r7 r/ s r iter_config_dirsz PlatformDirsABC.iter_config_dirs s """""" c # D K | j | j yw)z+:yield: all user and site data directories.N)r0 r3 r/ s r iter_data_dirszPlatformDirsABC.iter_data_dirs
s rw c # D K | j | j yw)z,:yield: all user and site cache directories.N)r9 r; r/ s r iter_cache_dirszPlatformDirsABC.iter_cache_dirs s !!!!!!rw c # D K | j | j yw)z.:yield: all user and site runtime directories.N)rM rO r/ s r iter_runtime_dirsz!PlatformDirsABC.iter_runtime_dirs s ######rw c # P K | j D ] }t | yw)z.:yield: all user and site configuration paths.N)rv r r' s r iter_config_pathsz!PlatformDirsABC.iter_config_paths s# ))+Dt* , $&c # P K | j D ] }t | yw)z%:yield: all user and site data paths.N)ry r r' s r iter_data_pathszPlatformDirsABC.iter_data_paths s# '')Dt* *r c # P K | j D ] }t | yw)z&:yield: all user and site cache paths.N)r{ r r' s r iter_cache_pathsz PlatformDirsABC.iter_cache_paths# s# ((*Dt* +r c # P K | j D ] }t | yw)z(:yield: all user and site runtime paths.N)r} r r' s r iter_runtime_pathsz"PlatformDirsABC.iter_runtime_paths( s# **,Dt* -r )NNNFFTF)r
str | Noner zstr | Literal[False] | Noner r r boolr r r r r r returnNone)r strr r )r r r r )r+ r r r )r r )r r )r z
Iterator[str])r zIterator[Path])2__name__
__module____qualname____doc__r r" r r, propertyr r0 r3 r5 r7 r9 r; r= r? rA rC rE rG rI rK rM rO rQ rT rV rY r[ r^ r` rb rd rg ri rk rm ro rr rt rv ry r{ r} r r r r r. r r r r s 7 #15"#== /= =
=
= = =
=~: 7 7 6 6 9 9 < < 8 8 7 7 8 8 6 6 < < < < ; ; 9 9 8 8 : : : : 9 9 ( ( ( ( * * * * ) ) ) ) ) ) ' ' - - - - , , * * ) ) + + + + + +#
!
"
$
r r )r
__future__r r abcr r pathlibr typingr collections.abcr r r r. r r r s. " # (\c \r PK ! ) ) # __pycache__/android.cpython-312.pycnu [
Cg5# 0 d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z m
Z
ddlmZ G d d e Z
ed
dd Z ed
dd Z ed
dd
Z ed
dd Z ed
dd Z ed
dd Zd gZy)zAndroid. )annotationsN) lru_cache)
TYPE_CHECKINGcast )PlatformDirsABCc 0 e Zd ZdZedd Zedd Zedd Zedd Zedd Z edd Z
edd Zedd Zedd
Z
edd Zedd Zedd
Zedd Zedd Zedd Zedd Zy)Androida"
Follows the guidance `from here `_.
Makes use of the `appname `, `version
`, `ensure_exists `.
c J | j t dt d S )zd:return: data directory tied to the user, e.g. ``/data/user///files/``strfiles_append_app_name_and_versionr _android_folderselfs C/opt/hc_python/lib/python3.12/site-packages/platformdirs/android.py
user_data_dirzAndroid.user_data_dir " 00e_=N1OQXYY c | j S )z@:return: data directory shared by users, same as `user_data_dir`r r s r
site_data_dirzAndroid.site_data_dir !!!r c J | j t dt d S )z
:return: config directory tied to the user, e.g. ``/data/user///shared_prefs/``
r shared_prefsr r s r user_config_dirzAndroid.user_config_dir! s" 00e_=N1OQ_``r c | j S )zH:return: config directory shared by the users, same as `user_config_dir`)r r s r site_config_dirzAndroid.site_config_dir) s ###r c J | j t dt d S )ze:return: cache directory tied to the user, e.g.,``/data/user///cache/``r cacher r s r user_cache_dirzAndroid.user_cache_dir. r r c | j S )zB:return: cache directory shared by users, same as `user_cache_dir`)r" r s r site_cache_dirzAndroid.site_cache_dir3 s """r c | j S )zB:return: state directory tied to the user, same as `user_data_dir`r r s r user_state_dirzAndroid.user_state_dir8 r r c v | j }| j r t j j |d }|S )z
:return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
e.g. ``/data/user///cache//log``
logr" opinionospathjoinr r, s r user_log_dirzAndroid.user_log_dir= / ""<<77<<e,Dr c t S )zT:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``)_android_documents_folderr s r user_documents_dirzAndroid.user_documents_dirH
)**r c t S )zT:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``)_android_downloads_folderr s r user_downloads_dirzAndroid.user_downloads_dirM r4 r c t S )zR:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``)_android_pictures_folderr s r user_pictures_dirzAndroid.user_pictures_dirR s
())r c t S )zS:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``)_android_videos_folderr s r user_videos_dirzAndroid.user_videos_dirW s
&''r c t S )zL:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``)_android_music_folderr s r user_music_dirzAndroid.user_music_dir\ s
%&&r c y)zP:return: desktop directory tied to the user e.g. ``/storage/emulated/0/Desktop``z/storage/emulated/0/Desktop r s r user_desktop_dirzAndroid.user_desktop_dira s -r c v | j }| j r t j j |d }|S )z
:return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
e.g. ``/data/user///cache//tmp``
tmpr) r. s r user_runtime_dirzAndroid.user_runtime_dirf r0 r c | j S )zF:return: runtime directory shared by users, same as `user_runtime_dir`)rF r s r site_runtime_dirzAndroid.site_runtime_dirq s $$$r Nreturnr )__name__
__module____qualname____doc__propertyr r r r r" r$ r&