/// <summary> /// Gets the unique filepath. /// </summary> /// <param name="self">The self.</param> /// <param name="rootPath">The root folder.</param> /// <param name="checkExists">The check exists.</param> /// <returns>System.String.</returns> public static string GetUniqueMediaFileWithPath(this MediaStorageOptions self, string rootPath, Func <string, bool> checkExists) { var isPhoto = !(self is VideoMediaStorageOptions); var path = self.GetMediaFileWithPath(rootPath); var folder = Path.GetDirectoryName(path); var name = Path.GetFileNameWithoutExtension(path); return(MediaFileHelpers.GetUniqueMediaFileWithPath(isPhoto, folder, name, checkExists)); }