예제 #1
0
    def user_state(self) -> Path:
        """
        User state path

        :return:
        :rtype:"""
        path = self._user_state_path(self._app_name,
                                     self._app_author,
                                     version=self._app_version)
        ensure_existence(path, enabled=self._ensure_existence)
        return path
예제 #2
0
    def user_config(self) -> Path:
        """
        User config path

        :return:
        :rtype:"""
        path = self._user_config_path(
            self._app_name,
            self._app_author,
            version=self._app_version,
            roaming=self._roaming,
        )
        ensure_existence(path, enabled=self._ensure_existence)
        return path
예제 #3
0
    def site_config(self) -> Path:
        """
        Site config path

        :return:
        :rtype:"""
        site_config = self._site_config_path(
            self._app_name,
            self._app_author,
            version=self._app_version,
            multi_path=self._multi_path,
        )
        ensure_existence(site_config, enabled=self._ensure_existence)
        return site_config
예제 #4
0
    def site_data(self) -> Path:
        """
        Site data path

        :return:
        :rtype:"""
        path = self._site_data_path(
            self._app_name,
            self._app_author,
            version=self._app_version,
            multi_path=self._multi_path,
        )
        ensure_existence(path, enabled=self._ensure_existence)
        return path
예제 #5
0
파일: app_path.py 프로젝트: pything/apppath
    def root_long_tmp(self) -> Path:
        """description

        :return:
        """
        if get_system() != SystemEnum.linux:
            raise SystemError("Invalid system")
        return ensure_existence(Path("/var/tmp") / self._app_name, enabled=self._ensure_existence)
예제 #6
0
    def user_log(self) -> Path:
        """
        User log path

        :return:
        :rtype:"""
        return ensure_existence(
            self._user_log_path(self._app_name, self._app_author, version=self._app_version),
            enabled=self._ensure_existence,
        )
예제 #7
0
파일: app_path.py 프로젝트: pything/apppath
    def user_log(self) -> Path:
        """
        User log path

        :return:
        :rtype:"""
        return ensure_existence(
            self._user_log_path(self._app_name, self._app_author, version=self._app_version),
            sanitisation_func=sanitise_path if self._sanitise_path else None,
            enabled=self._ensure_existence,
        )
예제 #8
0
    def user_data(self) -> Path:
        """
        User data path

        :return:
        :rtype:"""

        return ensure_existence(
            self._user_data_path(
                self._app_name,
                self._app_author,
                version=self._app_version,
                roaming=self._roaming,
            ),
            enabled=self._ensure_existence,
        )
예제 #9
0
파일: app_path.py 프로젝트: pything/apppath
    def site_config(self) -> Path:
        """
        Site config path

        :return:
        :rtype:"""
        return ensure_existence(
            self._site_config_path(
                self._app_name,
                self._app_author,
                version=self._app_version,
                multi_path=self._multi_path,
            ),
            sanitisation_func=sanitise_path if self._sanitise_path else None,
            enabled=self._ensure_existence,
        )
예제 #10
0
파일: app_path.py 프로젝트: pything/apppath
    def user_data(self) -> Path:
        """
        User data path

        :return:
        :rtype:"""

        return ensure_existence(
            self._user_data_path(
                self._app_name,
                self._app_author,
                version=self._app_version,
                roaming=self._roaming,
            ),
            sanitisation_func=sanitise_path if self._sanitise_path else None,
            enabled=self._ensure_existence,
        )
예제 #11
0
 def root_long_tmp(self) -> Path:
     if SYSTEM == "win32" or SYSTEM == "win32":
         raise SystemError("Invalid system")
     return ensure_existence(Path("/var/tmp") / self._app_name, enabled=self._ensure_existence)
예제 #12
0
 def root_config(self) -> Path:
     if SYSTEM == "win32" or SYSTEM == "win32":
         raise SystemError("Invalid system")
     return ensure_existence(Path("/etc") / self._app_name, enabled=self._ensure_existence)