Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
exists api
Browse files Browse the repository at this point in the history
  • Loading branch information
tib committed Dec 1, 2020
1 parent d3c825f commit a50084b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Sources/LiquidKit/FileStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>

// create a new directory for a given key
/// create a new directory for a given key
func createDirectory(key: String) -> EventLoopFuture<Void>

// 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<Void>

/// check if a given key exists
func exists(key: String) -> EventLoopFuture<Bool>
}

0 comments on commit a50084b

Please sign in to comment.