1.10
filesystem.h
1/*
2 * Copyright (C) 2018 Microchip Technology Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef EGT_DETAIL_FILESYSTEM_H
7#define EGT_DETAIL_FILESYSTEM_H
8
14#include <egt/detail/meta.h>
15#include <string>
16#include <vector>
17
18namespace egt
19{
20inline namespace v1
21{
22namespace detail
23{
24
30EGT_API std::string extract_filename(const std::string& path);
31
37EGT_API std::string extract_dirname(const std::string& path);
38
44EGT_API bool exists(const std::string& path);
45
51EGT_API std::vector<unsigned char> read_file(const std::string& path);
52
58EGT_API std::string readlink(const std::string& path);
59
65EGT_API std::string abspath(const std::string& path);
66
70EGT_API std::string exe_pwd();
71
75EGT_API std::string cwd();
76
83EGT_API char path_separator();
84
88EGT_API std::vector<std::string> glob(const std::string& pattern);
89
90}
91}
92}
93
94#endif
EGT_API char path_separator()
Get the separator character in a list of paths.
EGT_API std::string extract_dirname(const std::string &path)
Extract the directory name from a path.
EGT_API bool exists(const std::string &path)
Determine if a file exists.
EGT_API std::string abspath(const std::string &path)
Convert a relative path to an absolute path.
EGT_API std::string cwd()
Get the current working directory.
EGT_API std::string readlink(const std::string &path)
Read the path of a symlink.
EGT_API std::vector< std::string > glob(const std::string &pattern)
Given a glob pattern, return a vector of matching path names.
EGT_API std::string extract_filename(const std::string &path)
Extract the filename portion of a path or URL.
EGT_API std::string exe_pwd()
Get the directory to the current executable.
EGT_API std::vector< unsigned char > read_file(const std::string &path)
Read the contents of a file into a vector.
EGT framework namespace.
Definition animation.h:24