GRAYBYTE WORDPRESS FILE MANAGER9283

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/setoptconf/source/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/setoptconf/source//configfile.py
from configparser import ConfigParser

from ..setting import ListSetting
from ..util import csv_to_list
from .filebased import FileBasedSource


__all__ = ("ConfigFileSource",)


class ConfigFileSource(FileBasedSource):
    def __init__(self, *args, **kwargs):
        self.section = kwargs.pop("section", None)
        super(ConfigFileSource, self).__init__(*args, **kwargs)

    def get_settings_from_file(self, file_path, settings, manager=None):
        section = self.section or manager.name.lower()

        parser = ConfigParser()
        parser.read(file_path)

        if not parser.has_section(section):
            return None

        for setting in settings:
            if parser.has_option(section, setting.name):
                opt = parser.get(section, setting.name)
                if isinstance(setting, ListSetting):
                    setting.value = csv_to_list(opt)
                else:
                    setting.value = opt

        return settings

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 15 2025 08:30:34
root / root
0755
__pycache__
--
May 15 2025 08:30:34
root / root
0755
__init__.py
0.329 KB
April 17 2025 13:10:58
root / root
0644
base.py
0.142 KB
April 17 2025 13:10:58
root / root
0644
commandline.py
4.979 KB
April 17 2025 13:10:58
root / root
0644
configfile.py
0.955 KB
April 17 2025 13:10:58
root / root
0644
environment.py
0.978 KB
April 17 2025 13:10:58
root / root
0644
filebased.py
2.578 KB
April 17 2025 13:10:58
root / root
0644
jsonfile.py
0.827 KB
April 17 2025 13:10:58
root / root
0644
mapping.py
0.48 KB
April 17 2025 13:10:58
root / root
0644
modobj.py
1.674 KB
April 17 2025 13:10:58
root / root
0644
yamlfile.py
0.833 KB
April 17 2025 13:10:58
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF