/
githubmirror
/
libeconf
Обзор
Документация
Войти
/
githubmirror
/
libeconf
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/md_README.html
123 строки
8 KB
Stefan Schubert
update docu
27 апр 2026, 15:03
27 апр 2026, 15:03
a9d0c3d
Код
Авторство
О чём код?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=11"/> <meta name="generator" content="Doxygen 1.14.0"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>libeconf: libeconf</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <script type="text/javascript" src="clipboard.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="cookie.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr id="projectrow"> <td id="projectalign"> <div id="projectname">libeconf<span id="projectnumber"> 0.8.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.14.0 --> <script type="text/javascript"> $(function() { codefold.init(); }); </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',false,false,'search.php','Search',true); }); </script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(function(){initNavTree('md_README.html','',''); }); </script> <div id="container"> <div id="doc-content"> <div><div class="header"> <div class="headertitle"><div class="title">libeconf </div></div> </div><!--header--> <div class="contents"> <div class="textblock"><p><a class="anchor" id="autotoc_md0"></a></p> <p><b>libeconf</b> is a highly flexible and configurable library to parse and manage key=value configuration files. It reads configuration file snippets from different directories and builds the final configuration file for the application from it.</p> <p>The first file is the vendor provided configuration file places in /usr/<vendordir>/<project>. Optionally, /run/<project> is also supported for ephemeral overrides.</p> <p><em>Defining <project> sub directory is optional.</em></p> <p>There are two methods of overriding this vendor settings: Copy the file from /usr/<vendordir>/<project> to /etc/<project> and modify the settings (see <em>Example 1</em>).</p> <p>Alternatively, a directory named <file>.<suffix>.d/ within /etc/<project> can be created, with drop-in files in the form <name>.<suffix> (see <em>Example 2</em>).</p> <p>These files contain only the changes of the specific settings the user is interested in. There can be several such drop-in files, they are processed in lexicographic order of their filename.</p> <p>The first method is useful to override the complete configuration file with an own one, the vendor supplied configuration is ignored.</p> <p>So, if /etc/<project>/<example>.<suffix> exists, /usr/<vendor>/<project>/<example>.<suffix> and /run/<project>/<example>.<suffix> will not be read. The disadvantage is, that changes of the vendor configuration file, due e.g. an package update, are ignored and the user has to manually merge them.</p> <p>The other method will continue to use /usr/<vendor>/<project>/<example>.<suffix> as base configuration file and merge all changes from /etc/<project>/<example>.<suffix>.d/*.<suffix>. So the user will automatically get improvements of the vendor, with the drawback, that they could be incompatible with the user made changes.</p> <p>If there is a file with the same name in /usr/<vendor>/<project>/<example>.<suffix>.d/ and in /etc/<project>/<example>.<suffix>.d/*.<suffix>., the file in /usr/<project>/<vendor>/<example>.<suffix>.d/ will completely ignored.</p> <p>To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/<project>/, with the same filename as the vendor configuration file.</p> <p>Optionally, schemes with only drop-ins and without a ‘main’ configuration file will be supported too. In such schemes many drop-ins are loaded from a common directory in each hierarchy. For example, /usr/lib/<project>.d/*, /run/<project>.d/* and /etc/<project>.d/c.conf are all loaded and parsed in this scheme.</p> <p><b>Example 1</b></p> <p>If a /etc/<example>.<suffix> file exists:</p> <ul> <li>/etc/<example>.<suffix></li> <li>/usr/<vendor>/<project>/<example>.<suffix>.d/*.<suffix></li> <li>/run/<project>/<example>.<suffix>.d/*.<suffix></li> <li>/etc/<project>/<example>.<suffix>.d/*.<suffix></li> </ul> <p><b>Example 2</b></p> <p>The list of files and directories read if <b>no</b> /etc/<example>.<suffix> file exists:</p> <ul> <li>/usr/<vendor>/<project>/<example>.<suffix> if no /run/<project>/<example>.<suffix> exist</li> <li>/usr/_vendor_/<project>/<example>.<suffix>.d/*.<suffix></li> <li>/run/<project>/<example>.<suffix>.d/*.<suffix></li> <li>/etc/<project>/<example>.<suffix>.d/*.<suffix></li> </ul> <p>The libeconf library fulfills all requirements defined by the <b>Linux Userspace API (UAPI) Group</b> chapter "Configuration Files Specification". See: :<a href="https://uapi-group.org/specifications/specs/configuration_files_specification/">https://uapi-group.org/specifications/specs/configuration_files_specification/</a></p> <h1 class="doxsection"><a class="anchor" id="autotoc_md1"></a> API</h1> <p>The API is written in plain C. The description can be found here: <a href="https://opensuse.github.io/libeconf/">https://opensuse.github.io/libeconf/</a></p> <h1 class="doxsection"><a class="anchor" id="autotoc_md2"></a> Bindings for other languages</h1> <ul> <li><a href="https://github.com/openSUSE/libeconf/blob/v0.7.0/bindings/python3/">Python</a> (<a href="https://github.com/openSUSE/libeconf/blob/v0.6.0/bindings/python3/docs/python-libeconf.3">Documentation</a></li> <li><a href="https://github.com/openSUSE/libeconf/blob/v0.7.0/bindings/csharp/">C#</a> (<a href="https://github.com/openSUSE/libeconf/blob/v0.6.0/bindings/csharp/docs/README.md">Documentation</a>) </li> </ul> </div></div><!-- contents --> </div><!-- PageDoc --> </div><!-- doc-content --> <div id="page-nav" class="page-nav-panel"> <div id="page-nav-resize-handle"></div> <div id="page-nav-tree"> <div id="page-nav-contents"> </div><!-- page-nav-contents --> </div><!-- page-nav-tree --> </div><!-- page-nav --> </div><!-- container --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li> </ul> </div> </body> </html>