/// <summary>
        /// Gets the output file name with folder.
        /// </summary>
        /// <param name="self">The self.</param>
        /// <param name="rootPath">The root folder.</param>
        /// <returns>System.String.</returns>
        public static string GetMediaFileWithPath(this MediaStorageOptions self, string rootPath)
        {
            var isPhoto   = !(self is VideoMediaStorageOptions);
            var name      = (self != null) ? self.Name : null;
            var directory = (self != null) ? self.Directory : null;

            return(MediaFileHelpers.GetMediaFileWithPath(isPhoto, rootPath, directory, name));
        }
        /// <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));
        }