Skip to content
File

Blob: src/workerd/io/bundle-fs.h

cpp20 lines
1#pragma once
2 
3#include <workerd/io/worker-fs.h>
4#include <workerd/io/worker-source.h>
5 
6namespace workerd {
7 
8// Create a VirtualFileSystem directory from the bundle configuration. Each type of
9// module in the bundle is represented as a file. The directory structure is created
10// based on the module names. For example, if the bundle contains a module with the
11// name "foo/bar/baz", it will be represented as a directory "foo" with a subdirectory
12// "bar" and a file "baz" inside it. The directory structure and files are read-only.
13// All timestamps are set to the Unix epoch.
14//
15// Callers are expected to ensure that the pointers held by the WorkerSource remain
16// valid for the lifetime of the returned Directory.
17kj::Rc<Directory> getBundleDirectory(const WorkerSource& source);
18 
19} // namespace workerd