#include <KNfsExports.hpp>

Public Member Functions | |
| KNfsExports () | |
| KNfsExports (const Exports &exports) | |
| KNfsExports (const ExportEntries &entries) | |
| ~KNfsExports () | |
| bool | validExportOptions (const ExportOptions &options) const |
| bool | validExportClient (const ExportClient &client) const |
| bool | validExportEntry (const ExportEntry &entry) const |
| BLOCXX_NAMESPACE::Array < BLOCXX_NAMESPACE::String > | verifyExportOptions (const ExportOptions &options) const |
| BLOCXX_NAMESPACE::Array < BLOCXX_NAMESPACE::String > | verifyExportClient (const ExportClient &client) const |
| BLOCXX_NAMESPACE::Array < BLOCXX_NAMESPACE::String > | verifyExportEntry (const ExportEntry &entry) const |
| void | load (const BLOCXX_NAMESPACE::String &exportsFile) |
| void | save (const BLOCXX_NAMESPACE::String &exportsFile, const BLOCXX_NAMESPACE::String &backupSuffix) |
Static Public Member Functions | |
| static Exports | parseExportsFile (const BLOCXX_NAMESPACE::String &exportsFile) |
| static ExportEntry | parseExportEntry (const BLOCXX_NAMESPACE::String &exportsLine) |
| static void | writeExportsFile (const Exports &exports, const BLOCXX_NAMESPACE::String &exportsFile, const BLOCXX_NAMESPACE::String &backupSuffix) |
| static BLOCXX_NAMESPACE::String | decodeSubStr (BLOCXX_NAMESPACE::String &str, const BLOCXX_NAMESPACE::String &stopAt) |
| static BLOCXX_NAMESPACE::String | encodeString (const BLOCXX_NAMESPACE::String &str, bool exceptSpaces=false) |
Private Attributes | |
| KNfsExportRules * | rules |
| bool | dirty |
| limal::nfs_server::KNfsExports::KNfsExports | ( | ) |
| limal::nfs_server::KNfsExports::KNfsExports | ( | const Exports & | exports | ) |
| limal::nfs_server::KNfsExports::KNfsExports | ( | const ExportEntries & | entries | ) |
| limal::nfs_server::KNfsExports::~KNfsExports | ( | ) |
| bool limal::nfs_server::KNfsExports::validExportOptions | ( | const ExportOptions & | options | ) | const |
Set export entries. Add export entry.
| bool limal::nfs_server::KNfsExports::validExportClient | ( | const ExportClient & | client | ) | const |
| bool limal::nfs_server::KNfsExports::validExportEntry | ( | const ExportEntry & | entry | ) | const |
| BLOCXX_NAMESPACE ::Array< BLOCXX_NAMESPACE ::String> limal::nfs_server::KNfsExports::verifyExportOptions | ( | const ExportOptions & | options | ) | const |
| BLOCXX_NAMESPACE ::Array< BLOCXX_NAMESPACE ::String> limal::nfs_server::KNfsExports::verifyExportClient | ( | const ExportClient & | client | ) | const |
| BLOCXX_NAMESPACE ::Array< BLOCXX_NAMESPACE ::String> limal::nfs_server::KNfsExports::verifyExportEntry | ( | const ExportEntry & | entry | ) | const |
| void limal::nfs_server::KNfsExports::load | ( | const BLOCXX_NAMESPACE::String & | exportsFile | ) |
Loads export entries from the specified exports file TODO: and checks if all clients and options are known to knfs / using correct syntax.
| exportsFile | The exports file name. |
| void limal::nfs_server::KNfsExports::save | ( | const BLOCXX_NAMESPACE::String & | exportsFile, | |
| const BLOCXX_NAMESPACE::String & | backupSuffix | |||
| ) |
Saves current exports to specified exports file name creating a backup first if backupSuffix is not empty and the exports file alteady existed.
| exportsFile | The exports file name. | |
| backupSuffix | The suffix appended to exportsFile while writing a backup file. |
| static Exports limal::nfs_server::KNfsExports::parseExportsFile | ( | const BLOCXX_NAMESPACE::String & | exportsFile | ) | [static] |
Parse specified exports file and return export entries found in the file.
| static ExportEntry limal::nfs_server::KNfsExports::parseExportEntry | ( | const BLOCXX_NAMESPACE::String & | exportsLine | ) | [static] |
Parse the specified (exports file encoded) line and construct an export entry object.
| static void limal::nfs_server::KNfsExports::writeExportsFile | ( | const Exports & | exports, | |
| const BLOCXX_NAMESPACE::String & | exportsFile, | |||
| const BLOCXX_NAMESPACE::String & | backupSuffix | |||
| ) | [static] |
Saves specified export entries to the exports file name creating a backup first, if backupSuffix is not empty and the exports file already existed. No knfs related checks for export clients and options are done.
| entries | The export entries. | |
| exportsFile | The exports file name. | |
| backupSuffix | The suffix appended to exportsFile while writing a backup file. |
| static BLOCXX_NAMESPACE ::String limal::nfs_server::KNfsExports::decodeSubStr | ( | BLOCXX_NAMESPACE::String & | str, | |
| const BLOCXX_NAMESPACE::String & | stopAt | |||
| ) | [static] |
Decode first chunk of the string.
| static BLOCXX_NAMESPACE ::String limal::nfs_server::KNfsExports::encodeString | ( | const BLOCXX_NAMESPACE::String & | str, | |
| bool | exceptSpaces = false | |||
| ) | [static] |
Encode string to a form that can be written into a exports file. If exceptSpaces is true, the resulting string may be surrounded with quote marks ("") if it contains spaces. If exceptSpaces is false, all spaces are escaped to octal nmbers.
KNfsExportRules* limal::nfs_server::KNfsExports::rules [private] |
bool limal::nfs_server::KNfsExports::dirty [private] |
1.5.6