MCPcopy Create free account
hub / github.com/avast/retdec / getThisBinaryDirectoryPath

Function getThisBinaryDirectoryPath

src/utils/binary_path.cpp:63–74  ·  view source on GitHub ↗

* Get absolute path to directory of currently running binary. * * @return absolute path */

Source from the content-addressed store, hash-verified

61 * @return absolute path
62 */
63fs::path getThisBinaryDirectoryPath()
64{
65 std::size_t dirPathSize = 0;
66 std::string path = getStringThisBinaryPath(dirPathSize);
67
68 // Remove file from path.
69 if (!path.empty()) {
70 path.erase(dirPathSize + 1);
71 }
72
73 return path;
74}
75
76} // namespace utils
77} // namespace retdec

Callers 4

mainFunction · 0.85
doConfigFileFunction · 0.85
CompilerDetectorMethod · 0.85
TEST_FFunction · 0.85

Calls 3

getStringThisBinaryPathFunction · 0.85
emptyMethod · 0.45
eraseMethod · 0.45

Tested by 1

TEST_FFunction · 0.68