@@ -141,6 +141,29 @@ CPJ_PUBLIC size_t cpj_path_get_relative(enum cpj_path_style path_style,
141141CPJ_PUBLIC size_t cpj_path_join (enum cpj_path_style path_style ,
142142 const char * path_a , const char * path_b , char * buffer , size_t buffer_size );
143143
144+ /**
145+ * @brief Joins two paths together.
146+ *
147+ * This function generates a new path by combining the two submitted paths. It
148+ * will remove double separators, and unlike cpj_path_get_absolute it permits
149+ * the use of two relative paths to combine. The result will be written to a
150+ * buffer, which might be truncated if the buffer is not large enough to hold
151+ * the full path. However, the truncated result will always be
152+ * null-terminated. The returned value is the amount of characters which the
153+ * resulting path would take if it was not truncated (excluding the
154+ * null-terminating character).
155+ *
156+ * @param path_style Style depending on the operating system. So this should
157+ * detect whether we should use windows or unix paths.
158+ * @param path_a The first path which comes first.
159+ * @param path_b The second path which comes after the first.
160+ * @param buffer The buffer where the result will be written to.
161+ * @param buffer_size The size of the result buffer.
162+ * @return Returns the total amount of characters of the full, combined path.
163+ */
164+ CPJ_PUBLIC size_t cpj_path_join_module (enum cpj_path_style path_style ,
165+ const char * path_a , const char * path_b , char * buffer , size_t buffer_size );
166+
144167/**
145168 * @brief Joins multiple paths together.
146169 *
0 commit comments