ProzillaOS/docs/features/virtual-drive
2023-08-06 14:13:16 +02:00
..
virtual-file Updated documentation + README.md 2023-07-23 13:30:15 +02:00
virtual-folder Updated docs 2023-08-06 14:13:16 +02:00
virtual-root Updated docs 2023-08-06 14:13:16 +02:00
README.md Updated docs 2023-08-06 14:13:16 +02:00

← Back

Virtual Drive

The virtual drive is a virtual file and directory system. The root directory is a virtual folder and the access point for all interactions with the virtual drive.

Table of Contents

Examples

Component interacting with virtual drive

// components/applications/example/Example.jsx

export function Example() {
	const virtualRoot = useVirtualRoot();
	const [currentDirectory, setCurrentDirectory] = useState(virtualRoot.navigate("~"));

	currentDirectory.createFile("example", "txt", (file) => {
		file.setContent("Foo bar.");
	});
}