 |
PhoenixMock
1.8.7
Tools to split/merge/print mock used in Phoenix
|
Go to the documentation of this file.
7 #ifndef __STRING_FILENAME_H__
8 #define __STRING_FILENAME_H__
16 std::string
getExistingFileName(
const std::string & fileName,
const std::vector<std::string> & vecDirectory);
21 std::vector<std::string>
makeAbsolutePath(
const std::vector<std::string> & vecPath);
24 std::string
getUnderPath(
const std::string & fileName,
const std::string & pathPart);
25 std::vector<std::string>
getUnderPath(
const std::vector<std::string> & vecFileName,
const std::string & pathPart);
26 bool checkFileBegning(
const std::string & fileName,
const std::string & expectedBegining);
27 std::string
getFileName(
const std::string & fileName);
28 std::string
getDirName(
const std::string & path);
31 bool saveFileContent(
const std::string & filename,
const std::string & content);
std::string getUnderPath(const std::string &fileName, const std::string &pathPart)
Get path which is under the given pathPart ('some/dir/path' with 'dir' will return 'path')
bool checkFileBegning(const std::string &fileName, const std::string &expectedBegining)
Check if the given file starts with the given begning.
std::string getCurrentDirectory()
Returns the current directory.
std::string getDirName(const std::string &path)
Get the name of the deeper directory.
std::string getExtention(const std::string &fileName)
Get file extention.
std::string makeAbsolutePath(const std::string &path)
Make an absolute path of the given path.
std::string eraseLongestExtension(const std::string &fileName)
Erase longest extention of the given file.
bool isDirectoryExist(const std::string &dirName)
Says if the given direcotry exists.
bool isAbsolutePath(const std::string &path)
Tel if a path is absolute or not.
std::string getFileContent(const std::string &filename)
Get the file content in a string.
bool saveFileContent(const std::string &filename, const std::string &content)
Save a string in a file.
std::string getExistingFileName(const std::string &fileName, const std::vector< std::string > &vecDirectory)
Get the fileName with the directory to get a readable file.
std::string getDirectory(const std::string &fileName)
fonction qui renvoie le dossier parent du fichier
std::string getFileName(const std::string &fileName)
fonction qui renvoie le nom du fichier du nom complet de fichier passé en paramètre
bool isFileExist(const std::string &fileName)
Say if a file exsits or not.
std::string removePathDots(const std::string path)
Remove dots from the path.
std::string getLongestExtention(const std::string &fileName)
Get the longest file extention.
bool isFileOrDirExist(const std::string &fileName)
Say if the given path name exsits or not.
bool createDirectoriesIfNotExist(const std::string &dirName)
Create the directory if not exists.
std::string eraseExtension(const std::string &fileName)
Erase extention of the given file.