fswatch 1.17.1
path_utils.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014-2015 Enrico M. Crisostomo
3 *
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License as published by the Free Software
6 * Foundation; either version 3, or (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11 * details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program. If not, see <http://www.gnu.org/licenses/>.
15 */
26#ifndef FSW_PATH_UTILS_H
27# define FSW_PATH_UTILS_H
28
29# include <string>
30# include <vector>
31# include <sys/stat.h>
32
33namespace fsw
34{
44 std::string fsw_realpath(const char *path, char *resolved_path);
45
52 std::vector<std::string> get_directory_children(const std::string& path);
53
66 bool read_link_path(const std::string& path, std::string& link_path);
67
76 bool lstat_path(const std::string& path, struct stat& fd_stat);
77
86 bool stat_path(const std::string& path, struct stat& fd_stat);
87}
88#endif /* FSW_PATH_UTILS_H */
Main namespace of libfswatch.
Definition: event.cpp:24
std::string fsw_realpath(const char *path, char *resolved_path)
A thin wrapper about realpath.
Definition: path_utils.cpp:66