diff --git a/Sources/LiquidKit/FileStorage.swift b/Sources/LiquidKit/FileStorage.swift index d8a3fce..3fe0deb 100644 --- a/Sources/LiquidKit/FileStorage.swift +++ b/Sources/LiquidKit/FileStorage.swift @@ -10,18 +10,21 @@ import struct Foundation.Data public protocol FileStorage { var context: FileStorageContext { get } - //returns a key as a full url + /// returns a key as a full url func resolve(key: String) -> String - // uploads the data under the given key + /// uploads the data under the given key func upload(key: String, data: Data) -> EventLoopFuture - // create a new directory for a given key + /// create a new directory for a given key func createDirectory(key: String) -> EventLoopFuture - // list the contents of a given object for a key + /// list the contents of a given object for a key func list(key: String?) -> EventLoopFuture<[String]> - // deletes the data under the given key + /// deletes the data under the given key func delete(key: String) -> EventLoopFuture + + /// check if a given key exists + func exists(key: String) -> EventLoopFuture }