ReleaseButler 1.0
😙 package manager on GitHub 😙
Loading...
Searching...
No Matches
confile.h File Reference
#include <string_view>

Go to the source code of this file.

Functions

auto record2confile (std::string_view url, std::string_view name, std::string_view pack_name, std::string_view version, bool vmode) -> bool
 Save the passed parameters to the specified file for storage.
 
auto parse_confile (std::string_view filename, bool vmode) -> bool
 Parse the passed file name and start downloading and installing, etc.
 
auto parse_confile_core (std::string_view filename, bool vmode) -> bool
 The core part of parse_confile()
 

Function Documentation

◆ parse_confile()

auto parse_confile ( std::string_view filename,
bool vmode ) -> bool
nodiscard

Parse the passed file name and start downloading and installing, etc.

Because it is necessary to realize the function of traversing all files in the folder, the specific download and installation functions are implemented in parse_confile_core()

Parameters
`filename`File name to parse. If the file name is empty, iterate through all json files in the ~/.config/ReleaseButler/ folder
`vmode`Whether to output more information (for debugging purposes)
Returns
Returns a bool indicating whether the function was executed correctly.

◆ parse_confile_core()

auto parse_confile_core ( std::string_view filename,
bool vmode ) -> bool
nodiscard

The core part of parse_confile()

Parameters
`filename`File name to parse
`vmode`Whether to output more information (for debugging purposes)
Returns
Returns a bool indicating whether the function was executed correctly.

◆ record2confile()

auto record2confile ( std::string_view url,
std::string_view name,
std::string_view pack_name,
std::string_view version,
bool vmode ) -> bool
nodiscard

Save the passed parameters to the specified file for storage.

Note
File name cannot be specified
Parameters
`url`URL to store
`name`Name to store
`pack_name`Package name to store
`version`Version to store
`vmode`Whether to output more information (for debugging purposes)
Returns
Returns a bool indicating whether the function was executed correctly.