last ...
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
@@ -11,7 +12,8 @@ using xStorageService.Models;
|
||||
|
||||
namespace xStorageService.Interfaces
|
||||
{
|
||||
public partial interface IXStorageProvider {
|
||||
public partial interface IXStorageProvider
|
||||
{
|
||||
XStorageConfiguration Configuration { get; }
|
||||
XStorageHelper StorageHelper { get; }
|
||||
IFileProvider FileProvider { get; }
|
||||
@@ -19,85 +21,101 @@ namespace xStorageService.Interfaces
|
||||
|
||||
//
|
||||
#region Special Folders Path Getter (s) ...
|
||||
string GetStorageFolderPath ();
|
||||
string GetTempFolderPath ();
|
||||
string GetThumbFolderPath ();
|
||||
string GetUploadsFolderPath ();
|
||||
string GetWidgetsFolderPath ();
|
||||
string GetImageFolderPath ();
|
||||
string GetAudioFolderPath ();
|
||||
string GetVideoFolderPath ();
|
||||
string GetDocumentFolderPath ();
|
||||
string FilePathResolver (string fullPath);
|
||||
string GetStorageFolderPath();
|
||||
string GetTempFolderPath();
|
||||
string GetThumbFolderPath();
|
||||
string GetUploadsFolderPath();
|
||||
string GetWidgetsFolderPath();
|
||||
string GetImageFolderPath();
|
||||
string GetAudioFolderPath();
|
||||
string GetVideoFolderPath();
|
||||
string GetDocumentFolderPath();
|
||||
string FilePathResolver(string fullPath);
|
||||
string ConvertToFileUrl(string fullPath);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Prepare Storage Structure ...
|
||||
void Prepare ();
|
||||
void Prepare();
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Validators ...
|
||||
bool IsFolderExists (string path);
|
||||
bool IsFileExists (string filePath);
|
||||
bool IsSupportThumb (string fileName);
|
||||
bool IsSupportThumb (XFileType type);
|
||||
void ValidateFileExists (string filePath);
|
||||
void ValidateFileModel (XFileDto file);
|
||||
void ValidateFile (IFormFile file);
|
||||
void ValidateProfileImage (IFormFile file);
|
||||
bool IsFolderExists(string path);
|
||||
bool IsFileExists(string filePath);
|
||||
bool IsSupportThumb(string fileName);
|
||||
bool IsSupportThumb(XFileType type);
|
||||
void ValidateFileExists(string filePath);
|
||||
void ValidateFileModel(XFileDto file);
|
||||
void ValidateFile(IFormFile file);
|
||||
void ValidateProfileImage(IFormFile file);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Generators ...
|
||||
string NewFileName ();
|
||||
string GenerateThumbName (string fileName);
|
||||
string GetNewFileName (string fileName);
|
||||
string NewFileName();
|
||||
string GenerateThumbName(string fileName);
|
||||
string GetNewFileName(string fileName);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Tools Actions ...
|
||||
|
||||
string GetFileExtension (string fileName);
|
||||
string GetFileNameWithoutExtension (string fileName);
|
||||
FileExtensions GetFileExtensionType (string fileName);
|
||||
XFileType GetFileType (string fileName);
|
||||
XFileType GetFileType (FileExtensions fileExtension);
|
||||
string GetThumbnailFileFullPath (string thumFileName);
|
||||
string GetRelatedThumbnailFullPath (string fileName);
|
||||
string GetFileTypeFolderPath (XFileType type);
|
||||
string GetFileFolderPath (
|
||||
string GetFileExtension(string fileName);
|
||||
string GetFileNameWithoutExtension(string fileName);
|
||||
FileExtensions GetFileExtensionType(string fileName);
|
||||
XFileType GetFileType(string fileName);
|
||||
XFileType GetFileType(FileExtensions fileExtension);
|
||||
string GetThumbnailFileFullPath(string thumFileName);
|
||||
string GetRelatedThumbnailFullPath(string fileName);
|
||||
string GetFileTypeFolderPath(XFileType type);
|
||||
string GetFileFolderPath(
|
||||
string fileName,
|
||||
bool isTemp = false,
|
||||
bool isWidget = false
|
||||
);
|
||||
string GetFileFullPath (
|
||||
string GetFileFullPath(
|
||||
string fileName,
|
||||
bool isTemp = false,
|
||||
bool isWidget = false
|
||||
);
|
||||
Task<string> SaveFileAsync (
|
||||
Task<string> SaveFileAsync(
|
||||
IFormFile file,
|
||||
bool isTemp = false,
|
||||
bool isWidget = false
|
||||
bool isWidget = false,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
void DeleteFile (
|
||||
void DeleteFile(
|
||||
string fileFullPath,
|
||||
bool forceFileExists = true,
|
||||
Exception exception = null
|
||||
);
|
||||
ICollection<string> DeleteFiles (
|
||||
ICollection<string> DeleteFiles(
|
||||
ICollection<string> fileFullPaths,
|
||||
bool forceFileExists = true,
|
||||
Exception exception = null
|
||||
);
|
||||
// Task CreateThumbnail (XFile file);
|
||||
Task CreateThumbnail (XFileDto file);
|
||||
Task CreateThumbnail (string fileName);
|
||||
Task<XFileResult> HandleProfileImageSave (IFormFile file);
|
||||
Task<XFileResult> HandleFileSave (IFormFile file);
|
||||
Task<IEnumerable<XFileResult>> HandleFilesSave (IFormFileCollection files);
|
||||
Task CreateThumbnail(
|
||||
XFileDto file,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
Task CreateThumbnail(
|
||||
string fileName,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
Task<XFileResult> HandleProfileImageSave(
|
||||
IFormFile file,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
Task<XFileResult> HandleFileSave(
|
||||
IFormFile file,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
Task<IEnumerable<XFileResult>> HandleFilesSave(
|
||||
IFormFileCollection files,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+399
-257
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user