fix: improve error message for folders

This commit is contained in:
tdurieux
2023-05-08 15:16:56 +02:00
parent 4f6c1d25fc
commit 027f14ffbc
6 changed files with 56 additions and 26 deletions

View File

@@ -32,6 +32,12 @@ export interface SourceBase {
export type Source = GitHubDownload | GitHubStream | Zip;
export enum FILE_TYPE {
FILE = "file",
FOLDER = "folder",
NOT_FOUND = "not_found",
}
export interface StorageBase {
/**
* The type of storage
@@ -42,7 +48,7 @@ export interface StorageBase {
* check if the path exists
* @param path the path to check
*/
exists(path: string): Promise<boolean>;
exists(path: string): Promise<FILE_TYPE>;
send(p: string, res: Response): Promise<void>;