Storage

In progress

Reading files from a directory

const publicFiles = await storage.files('public')
const publicFilesDeep = await storage.files('public', true)

Read the content of a file

const content = await storage.read('public/index.html')

Check if a file exists

const fileExists = await storage.exists('index.ts')

Write to a file

const file = await storage.read('index.html')
await storage.save(file, 'public/html')
await storage.save(file, 'public/html' , 'main.html')

Create a directory

await storage.makeDirectory('public/images')
await storage.makeDirectory('public/videos')

Deleting a file

await storage.delete('public/index.html')