Skip to content

Commit

Permalink
macos template
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeryStk committed Nov 15, 2023
1 parent 8a47927 commit d042a02
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions common_utils/common_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,23 @@ void openFileBySystem(const string& file_name) {
namespace davis {

string getCurrentPath() {
#if defined (_WIN32) || (__linux__)
char buffer[1024];
char* answer = getcwd(buffer, sizeof(buffer));
string s_cwd;
if (answer) {
s_cwd = answer;
}
return s_cwd;
};
#elif __APPLE__
//TODO macos get current path implementation
return "";
#endif
}

bool isPlotlyScriptExists() {
return is_file_exists(kPlotlyJsWorkPath);
};
}

bool saveStringToFile(const string& file_name,
const string& data) {
Expand Down

0 comments on commit d042a02

Please sign in to comment.