]> wimlib.net Git - wimlib/blobdiff - src/util.c
mount changes (IN PROGRESS)
[wimlib] / src / util.c
index 725b12725c4fb91c2279244397be38fe75b070bc..e14ddd403f64eef883594f7a805ffec19c1e8a15 100644 (file)
@@ -428,6 +428,16 @@ const char *path_basename(const char *path)
        return p + 1;
 }
 
+const char *path_stream_name(const char *path)
+{
+       const char *base = path_basename(path);
+       const char *stream_name = strchr(base, ':');
+       if (!stream_name)
+               return NULL;
+       else
+               return stream_name + 1;
+}
+
 /* 
  * Splits a file path into the part before the first '/', or the entire name if
  * there is no '/', and the part after the first sequence of '/' characters.