| 1 | // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file |
| 2 | // for details. All rights reserved. Use of this source code is governed by a |
| 3 | // BSD-style license that can be found in the LICENSE file. |
| 4 | |
| 5 | #ifndef RUNTIME_BIN_EXE_UTILS_H_ |
| 6 | #define RUNTIME_BIN_EXE_UTILS_H_ |
| 7 | |
| 8 | #include <stdlib.h> |
| 9 | #include <string.h> |
| 10 | |
| 11 | #include "include/dart_api.h" |
| 12 | #include "platform/globals.h" |
| 13 | #include "platform/utils.h" |
| 14 | |
| 15 | namespace dart { |
| 16 | namespace bin { |
| 17 | |
| 18 | class EXEUtils { |
| 19 | public: |
| 20 | // Returns the path to the directory the current executable resides in. |
| 21 | static Utils::CStringUniquePtr GetDirectoryPrefixFromExeName(); |
| 22 | |
| 23 | private: |
| 24 | DISALLOW_COPY_AND_ASSIGN(EXEUtils); |
| 25 | }; |
| 26 | |
| 27 | } // namespace bin |
| 28 | } // namespace dart |
| 29 | |
| 30 | #endif // RUNTIME_BIN_EXE_UTILS_H_ |
| 31 | |