summaryrefslogtreecommitdiff
path: root/Kernel/KLexicalPath.h
blob: e2cdc06df87d404743c9ac578e7fa4b2a902e2f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (c) 2021, Max Wipfli <max.wipfli@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/StringView.h>
#include <Kernel/KString.h>

namespace Kernel::KLexicalPath {

bool is_absolute(StringView const&);
bool is_canonical(StringView const&);
StringView basename(StringView const&);
StringView dirname(StringView const&);
Vector<StringView> parts(StringView const&);

ErrorOr<NonnullOwnPtr<KString>> try_join(StringView const&, StringView const&);

}