#include "nvsgcommon.h"
#include <vector>
#include "__WIN64__workarounds.h"
Include dependency graph for Tools.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | nvutil |
Functions | |
NVSG_API bool | FindFile (const std::string &mask, const std::vector< std::string > &searchPaths, std::vector< std::string > &results, bool recursive=false) |
Find files matching a pattern. | |
NVSG_API bool | FindFileFirst (const std::string &mask, const std::vector< std::string > &searchPaths, std::string &nameOut, bool recursive=false) |
Check for the first occurence of a file. | |
NVSG_API bool | FileExists (const std::string &filepath) |
Check if a given file exists. | |
NVSG_API void | GetFileNameFromPath (const std::string &path, std::string &fname) |
Extract filename. | |
NVSG_API void | GetFileExtFromPath (const std::string &path, std::string &fext) |
Extract file extension. | |
NVSG_API void | GetDirFromPath (const std::string &path, std::string &dir) |
Extract directory path. | |
NVSG_API void | GetDrvFromPath (const std::string &path, std::string &drv) |
Extract drive letter. | |
NVSG_API void | GetDrvAndDirFromPath (const std::string &path, std::string &dir) |
Extract full path. | |
NVSG_API bool | GetCurrentDir (std::string &path) |
Get the current directory for the current process. | |
template<typename T> | |
T | Maximum (T a, T b, T c) |
template<typename T> | |
T | Minimum (T a, T b, T c) |
NVSG_API std::string | SetCurrentDir (const std::string &dir) |
Set the current directory for the current process. |
|
Find files matching a pattern. Tries to find files matching mask and output results (full path) to results
|
|
Check for the first occurence of a file. Works as FindFile, but return the first match only to nameOut
|
|
Check if a given file exists.
|
|
Extract filename. Extracts the filename with extension from path and returns it in fname.
|
|
Extract file extension. Extracts the file extension, including leading period from path and returns it in fext.
|
|
Extract directory path. Extracts the directory path, including trailing slash from path and returns it in dir.
|
|
Extract drive letter. Extracts the optional drive letter, followed by a colon from path and returns it in drv.
|
|
Extract full path. Extracts the drive and directory from path and returns it in dir.
|
|
Get the current directory for the current process. path will hold the current directory if the function succeeds
|
|
Set the current directory for the current process. Sets the current directory for the current process to path and returns the former current directory.
|