diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-08-26 17:27:29 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-08-29 01:38:39 +0200 |
| commit | 5da15de17469047d313cd574aaa4bc226bd4cae2 (patch) | |
| tree | e57519ea5d0510bb45e1430fea74d040c6b961d2 /src/filename_absolute.cxx | |
| parent | d11c412f953774bf5b0747815c67f6b6e759d4c8 (diff) | |
FLUID: simplified worker handling
Diffstat (limited to 'src/filename_absolute.cxx')
| -rw-r--r-- | src/filename_absolute.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx index bcf02d93f..8d016c991 100644 --- a/src/filename_absolute.cxx +++ b/src/filename_absolute.cxx @@ -325,3 +325,13 @@ Fl_String fl_filename_relative(const Fl_String &from) { fl_filename_relative(buffer, FL_PATH_MAX, from.c_str()); return Fl_String(buffer); } + +/** Cross-platform function to get the current working directory + as a UTF-8 encoded value in an Fl_String. + \return the CWD encoded as UTF-8 + */ +Fl_String fl_getcwd() { + char buffer[FL_PATH_MAX]; + fl_getcwd(buffer, FL_PATH_MAX); + return Fl_String(buffer); +} |
