/// <summary>Returns whether is access public.</summary>
        /// <param name="path">Path to check.</param>
        private bool IsPublicAccess(string path)
        {
            AbstractStorageProvider storageProvider = StorageHelper.GetStorageProvider(path);

            if (storageProvider.PublicExternalFolderObject.HasValue)
            {
                return(storageProvider.PublicExternalFolderObject.Value);
            }
            return(AmazonHelper.PublicAccess);
        }
        /// <summary>Returns bucket name from account info.</summary>
        /// <param name="path">Path for which is bucket name returned.</param>
        public static string GetBucketName(string path)
        {
            AbstractStorageProvider storageProvider = StorageHelper.GetStorageProvider(path);

            if (!string.IsNullOrEmpty(storageProvider.CustomRootPath))
            {
                return(storageProvider.CustomRootPath);
            }
            return(AccountInfo.Current.BucketName);
        }