Flutter Engine
The Flutter Engine
path.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FILESYSTEM_PATH_H_
6#define FILESYSTEM_PATH_H_
7
8#include <string>
9
10namespace filesystem {
11
12// Resolves ".." and "." components of the path syntactically without consulting
13// the file system.
14std::string SimplifyPath(std::string path);
15
16// Returns the absolute path of a possibly relative path.
17// It doesn't consult the filesystem or simplify the path.
18std::string AbsolutePath(const std::string& path);
19
20// Returns the directory name component of the given path.
21std::string GetDirectoryName(const std::string& path);
22
23// Returns the basename component of the given path by stripping everything up
24// to and including the last slash.
25std::string GetBaseName(const std::string& path);
26
27// Returns the real path for the given path by unwinding symbolic links and
28// directory traversals.
29std::string GetAbsoluteFilePath(const std::string& path);
30
31} // namespace filesystem
32
33#endif // FILESYSTEM_PATH_H_
std::string GetBaseName(const std::string &path)
Definition: path_posix.cc:169
std::string AbsolutePath(const std::string &path)
Definition: path_posix.cc:147
std::string GetAbsoluteFilePath(const std::string &path)
Definition: path_posix.cc:176
std::string GetDirectoryName(const std::string &path)
Definition: path_posix.cc:160
std::string SimplifyPath(std::string path)
Definition: path_posix.cc:48
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57