filesystem_util.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <filesystem>
4
#include <fstream>
5
#include <iostream>
6
#include <vector>
7
8
namespace
armarx::armem::server::ltm::disk
9
{
10
namespace
filesystem::util
11
{
12
size_t
getSizeOfDirectory
(
const
std::filesystem::path& p);
13
14
bool
checkIfFolderInFilesystemExists
(
const
std::filesystem::path& p);
15
16
void
ensureFolderInFilesystemExists
(
const
std::filesystem::path& p,
17
bool
createIfNotExistent =
true
);
18
19
bool
checkIfFileInFilesystemExists
(
const
std::filesystem::path& p);
20
21
void
ensureFileInFilesystemExists
(
const
std::filesystem::path& p);
22
23
void
writeDataInFilesystemFile
(
const
std::filesystem::path& p,
24
const
std::vector<unsigned char>&
data
);
25
26
std::vector<unsigned char>
readDataFromFilesystemFile
(
const
std::filesystem::path path);
27
28
std::vector<std::string>
getAllFilesystemDirectories
(
const
std::filesystem::path path);
29
30
std::vector<std::string>
getAllFilesystemFiles
(
const
std::filesystem::path path);
31
}
// namespace filesystem::util
32
}
// namespace armarx::armem::server::ltm::disk
armarx::armem::server::ltm::disk::filesystem::util::readDataFromFilesystemFile
std::vector< unsigned char > readDataFromFilesystemFile(const std::filesystem::path path)
Definition:
filesystem_util.cpp:93
armarx::armem::server::ltm::disk::filesystem::util::getAllFilesystemDirectories
std::vector< std::string > getAllFilesystemDirectories(const std::filesystem::path path)
Definition:
filesystem_util.cpp:102
armarx::armem::server::ltm::disk::filesystem::util::checkIfFileInFilesystemExists
bool checkIfFileInFilesystemExists(const std::filesystem::path &p)
Definition:
filesystem_util.cpp:62
armarx::armem::server::ltm::disk::filesystem::util::getSizeOfDirectory
size_t getSizeOfDirectory(const std::filesystem::path &p)
Definition:
filesystem_util.cpp:12
data
uint8_t data[1]
Definition:
EtherCATFrame.h:68
armarx::armem::server::ltm::disk::filesystem::util::writeDataInFilesystemFile
void writeDataInFilesystemFile(const std::filesystem::path &p, const std::vector< unsigned char > &data)
Definition:
filesystem_util.cpp:78
armarx::armem::server::ltm::disk::filesystem::util::ensureFolderInFilesystemExists
void ensureFolderInFilesystemExists(const std::filesystem::path &p, bool createIfNotExistent)
Definition:
filesystem_util.cpp:46
armarx::armem::server::ltm::disk::filesystem::util::checkIfFolderInFilesystemExists
bool checkIfFolderInFilesystemExists(const std::filesystem::path &p)
Definition:
filesystem_util.cpp:40
armarx::armem::server::ltm::disk::filesystem::util::getAllFilesystemFiles
std::vector< std::string > getAllFilesystemFiles(const std::filesystem::path path)
Definition:
filesystem_util.cpp:118
armarx::armem::server::ltm::disk
Definition:
filesystem_util.cpp:7
armarx::armem::server::ltm::disk::filesystem::util::ensureFileInFilesystemExists
void ensureFileInFilesystemExists(const std::filesystem::path &p)
Definition:
filesystem_util.cpp:68
RobotAPI
libraries
armem
server
ltm
legacy
util
filesystem_util.h
Generated by
1.8.17