QtPass
2.0.0
Developer documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
pathvalidator.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2014 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
8
#ifndef SRC_PATHVALIDATOR_H_
9
#define SRC_PATHVALIDATOR_H_
10
11
#include <QString>
12
#include <optional>
13
31
class
PathValidator {
32
public
:
53
static
auto
isPathInStore
(
const
QString &storeRoot,
const
QString &candidate)
54
-> bool;
55
69
static
auto
storeRelativePath
(
const
QString &storeRoot,
70
const
QString &candidate)
71
-> std::optional<QString>;
72
85
static
auto
isTargetSpelled
(
const
QString &storeRoot,
const
QString &path)
86
-> bool;
87
88
private
:
89
PathValidator() =
default
;
90
};
91
92
#endif
// SRC_PATHVALIDATOR_H_
PathValidator::storeRelativePath
static auto storeRelativePath(const QString &storeRoot, const QString &candidate) -> std::optional< QString >
Where candidate lies in the store, judged as isPathInStore() judges it.
Definition
pathvalidator.cpp:18
PathValidator::isPathInStore
static auto isPathInStore(const QString &storeRoot, const QString &candidate) -> bool
Check that a candidate path resolves inside the password store root, after following symlinks and res...
Definition
pathvalidator.cpp:13
PathValidator::isTargetSpelled
static auto isTargetSpelled(const QString &storeRoot, const QString &path) -> bool
Whether path is spelled through the target of a store root that is itself a link, rather than from th...
Definition
pathvalidator.cpp:69
src
pathvalidator.h
Generated by
1.18.0