|
1 | 1 | /* |
2 | | - * Copyright (C) 2019 HERE Europe B.V. |
| 2 | + * Copyright (C) 2019-2020 HERE Europe B.V. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -29,36 +29,79 @@ namespace utils { |
29 | 29 | class CORE_API Dir { |
30 | 30 | public: |
31 | 31 | /** |
32 | | - * @brief exists checks if directory exists |
33 | | - * @param path path of the directory |
34 | | - * @return true if directory exists, false otherwise. |
| 32 | + * @brief Checks if directory exists. |
| 33 | + * |
| 34 | + * @param path Path of the directory. |
| 35 | + * |
| 36 | + * @return \c true if directory exists, \c false otherwise. |
| 37 | + * |
| 38 | + * @deprecated Will be removed by 10.2020. Please use Exists() instead. |
35 | 39 | */ |
36 | 40 | static bool exists(const std::string& path); |
37 | 41 |
|
38 | 42 | /** |
39 | | - * @brief remove removes the directory, deleting all subfolders and files. |
40 | | - * @param path path of the directory |
| 43 | + * @brief Checks if directory exists. |
| 44 | + * |
| 45 | + * @param path Path of the directory. |
| 46 | + * |
| 47 | + * @return true if directory exists, false otherwise. |
| 48 | + */ |
| 49 | + static bool Exists(const std::string& path); |
| 50 | + |
| 51 | + /** |
| 52 | + * @brief Removes the directory, deleting all subfolders and files. |
| 53 | + * |
| 54 | + * @param path Path of the directory. |
| 55 | + * |
41 | 56 | * @return true if operation is successfull, false otherwise. |
| 57 | + * |
| 58 | + * @deprecated Will be removed by 10.2020. Please use Remove() instead. |
42 | 59 | */ |
43 | 60 | static bool remove(const std::string& path); |
44 | 61 |
|
45 | 62 | /** |
46 | | - * @brief create creates the directory including all required directories on |
| 63 | + * @brief Removes the directory, deleting all subfolders and files. |
| 64 | + * |
| 65 | + * @param path Path of the directory. |
| 66 | + * |
| 67 | + * @return \c true if operation is successfull, \c false otherwise. |
| 68 | + */ |
| 69 | + static bool Remove(const std::string& path); |
| 70 | + |
| 71 | + /** |
| 72 | + * @brief Creates the directory including all required directories on |
47 | 73 | * the path. |
48 | | - * @param path path of the directory |
49 | | - * @return true if operation is successfull, false otherwise. |
| 74 | + * |
| 75 | + * @param path Path of the directory. |
| 76 | + * |
| 77 | + * @return \c true if operation is successfull, \c false otherwise. |
| 78 | + * |
| 79 | + * @deprecated Will be removed by 10.2020. Please use Create() instead. |
50 | 80 | */ |
51 | 81 | static bool create(const std::string& path); |
52 | 82 |
|
53 | 83 | /** |
54 | | - * @brief TempDirectory returns the platform-specific temporary path. |
55 | | - * @return temporary directory path |
| 84 | + * @brief Creates the directory including all required directories on |
| 85 | + * the path. |
| 86 | + * |
| 87 | + * @param path Path of the directory. |
| 88 | + * |
| 89 | + * @return \c true if operation is successfull, \c false otherwise. |
| 90 | + */ |
| 91 | + static bool Create(const std::string& path); |
| 92 | + |
| 93 | + /** |
| 94 | + * @brief Returns the platform-specific temporary path. |
| 95 | + * |
| 96 | + * @return The platform specific temporary directory path. |
56 | 97 | */ |
57 | 98 | static std::string TempDirectory(); |
58 | 99 |
|
59 | 100 | /** |
60 | | - * @brief Check whether file exists. |
61 | | - * @param[in] file_path Path to the file. |
| 101 | + * @brief Check whether the provided file exists. |
| 102 | + * |
| 103 | + * @param file_path Path to the file. |
| 104 | + * |
62 | 105 | * @return \c true if any file with the given path exists, \c false otherwise. |
63 | 106 | */ |
64 | 107 | static bool FileExists(const std::string& file_path); |
|
0 commit comments