+/**
+ * @brief replaces all matching substrings of the regular expression with a given replacement
+ * @param[in] original string
+ * @param[in] pattern to match
+ * @param[in] replacement string
+ * return the modified string
+ */
+std::string replaceAll(const std::string &str, const std::string &pattern, const std::string &replace);
+
+/**
+ * @brief get root path
+ * @param[in] package id
+ * @param[out] root path
+ */
+int getRootPath(std::string pkgId, std::string& rootPath);
+
+/**
+ * @brief get exec name
+ * @param[in] package id
+ * @param[out] exec name
+ */
+int getExecName(std::string pkgId, std::string& execName);
+
+/**
+ * @brief get metadata value
+ * @param[in] package id
+ * @param[in] metadata key
+ * @param[out] metadata value
+ */
+int getMetadataValue(std::string pkgId, std::string metadataKey, std::string& metadataValue);
+
+/**
+ * @brief split path with ":" delimiter and put that in the vector
+ * @param[in] source path
+ * @param[out] string vector
+ */
+void splitPath(const std::string& path, std::vector<std::string>& out);
+
+/**
+ * @brief check file is exist
+ * @param[in] source path
+ * @return bool
+ */
+bool isFileExist(const std::string& path);
+
+/**
+ * @brief check directory is exist
+ * @param[in] source path
+ * @return bool
+ */
+bool isDirectoryExist(const std::string& path);
+
+/**
+ * @brief get file size
+ * @param[in] source path
+ * @return size of file
+ */
+uintptr_t getFileSize(const std::string& path);
+
+/**
+ * @brief check the file is managed assembly or not.
+ * @param[in] file path
+ * @return return true when the file is managed assembly.
+ * otherwise return false including native image case.
+ */
+bool isManagedAssembly(const std::string& filePath);
+
+/**
+ * @brief check the file is native image or not.
+ * @param[in] file path
+ * @return return true when the file is native image.
+ */
+bool isNativeImage(const std::string& filePath);
+
+/**
+ * @brief Resolve assembly files from directories and append their paths to the given list.
+ * @remark If a native image exists for an assembly in the same directory, it will be used.
+ * If multiple assemblies of the same name exist, the first one will be used.
+ * @param[in] directories list of directories
+ * @param[out] list colon-separated string of assembly paths
+ */
+void addAssembliesFromDirectories(const std::vector<std::string>& directories, std::string& list);
+
+/**
+ * @brief File search callback
+ * @param[in] path full path to a resolved file
+ * @param[in] filename file name
+ */
+typedef std::function<void (const std::string& path, const std::string& filename)> FileReader;
+
+/**
+ * @brief Scan all files in the given directory.
+ * @param[in] directory path to a root directory
+ * @param[in] reader callback for iteration
+ * @param[in] depth recursive search depth
+ */
+void scanFilesInDirectory(const std::string& directory, FileReader reader, unsigned int depth);
+
+/**
+ * @brief copy smack and ownership.
+ * @param[in] get path
+ * @param[in] set path
+ * @param[in] symbolic link
+ */
+void copySmackAndOwnership(const std::string& fromPath, const std::string& toPath, bool isSymlink = false);
+
+/**
+ * @brief create the new directory.
+ * @param[in] source path
+ * @return return true when the directory was created.
+ */
+bool createDir(const bf::path& path);