An open API service indexing awesome lists of open source software.

https://github.com/tinybiggames/vdrive

VDrive is a lightweight Delphi library that gives your application its own personal virtual drive โ€” a full filesystem that lives entirely in memory. No drivers. No installers. No files ever touch disk.
https://github.com/tinybiggames/vdrive

delphi object-pascal pascal vfs-layer virtual-drive virtual-filesystem virtual-folder win64 windows-10 windows-11

Last synced: 9 months ago
JSON representation

VDrive is a lightweight Delphi library that gives your application its own personal virtual drive โ€” a full filesystem that lives entirely in memory. No drivers. No installers. No files ever touch disk.

Awesome Lists containing this project

README

          

![VDrive](media/vdrive.jpg)
[![Chat on Discord](https://img.shields.io/discord/754884471324672040?style=for-the-badge)](https://discord.gg/tPWjMwK)
[![Follow on Bluesky](https://img.shields.io/badge/Bluesky-tinyBigGAMES-blue?style=for-the-badge&logo=bluesky)](https://bsky.app/profile/tinybiggames.com)

**VDrive** is a lightweight, high-performance Delphi library that empowers your applications with their own private, fully virtualized filesystem โ€” entirely in-memory, with **no drivers**, **no installers**, and **no filesystem footprint**. ๐Ÿ›ก๏ธ

It exposes a simple and intuitive API:

```pascal
function vdPath(const AFilename: string): string;
```

Given any filename, `vdPath` returns a special **virtual drive path** where you can seamlessly create, read, write, and manage files and folders **as if they existed on the real disk**.
Files written to this virtual drive persist for the lifetime of your application and are completely invisible to the underlying operating system. ๐Ÿงฉ

When your application terminates, the entire virtual filesystem is automatically destroyed, leaving **no traces** behind. ๐Ÿงน

## ๐ŸŽฏ What You Can Do with VDrive

- ๐Ÿ“ฆ Package and load **DLLs** and **assets** hidden inside your EXE, without ever writing to disk.
- ๐Ÿ“„ Create and manage **temporary files**, **cache files**, **logs**, and **configuration data** entirely in memory.
- ๐Ÿ”ง Access your virtual drive using **standard Delphi file I/O APIs** (`TFile`, `TStream`, `AssignFile`, etc.).
- ๐Ÿ” **Secure** your runtime resources from tampering, antivirus false positives, and prying eyes.
- ๐Ÿงน Eliminate filesystem clutter โ€” no need to extract files or clean up temporary folders.

**Anything you can do with the OS filesystem, you can do inside your app's private virtual drive.** ๐Ÿš€

## โœจ Key Features

- **Simple API** โ€” One function (`vdPath`) to access your virtual drive.
- **Fully In-Memory** โ€” Files never touch the physical disk.
- **Standard Compatibility** โ€” Works transparently with existing Delphi file handling routines.
- **Secure & Hidden** โ€” Protects your embedded resources and runtime data.
- **Zero External Dependencies** โ€” Pure native Delphi, no third-party libraries.
- **Tiny Footprint** โ€” Minimal overhead, blazing fast performance.
- **Automatic Cleanup** โ€” Virtual filesystem vanishes when your app exits.
- **User-Mode Only** โ€” No drivers, no admin rights, no OS modifications.

## ๐Ÿ”ฅ Example: Loading a DLL from a `TResourceStream` into VDrive

```pascal
uses
System.Classes, System.SysUtils, System.IOUtils, Winapi.Windows, VDrive;

procedure LoadDllFromResource;
var
LResStream: TResourceStream;
LPath: string;
begin
// Generate a virtual path for the DLL
LPath := vdPath('myhidden.dll');

// Load the DLL from an embedded resource into the virtual drive
LResStream := TResourceStream.Create(HInstance, 'MYDLL', RT_RCDATA);
try
LResStream.SaveToFile(LPath);
finally
LResStream.Free;
end;

// Load the DLL at runtime, directly from the virtual drive
if LoadLibrary(PChar(LPath)) = 0 then
RaiseLastOSError;
end;
```

> ๐Ÿ’ก In this example, the DLL is embedded inside your application as a resource (`MYDLL`), saved virtually to VDrive, and loaded without ever touching disk storage.

## ๐Ÿ› ๏ธ Why Use VDrive?

| ๐Ÿงฉ Challenge | ๐Ÿš€ VDrive Solution |
|:---|:---|
| Need to extract temporary files securely | Store them in your private virtual drive |
| Want to ship runtime DLLs/assets without exposing them | Embed and load them invisibly in memory |
| Tired of cleaning up temp folders | Let VDrive auto-clean when your app closes |
| Risk of antivirus false positives from temp file writes | Eliminate disk I/O entirely |
| Need easy integration into existing code | Works seamlessly with standard file operations |

## ๐Ÿ’ผ Typical Use Cases

- ๐Ÿ“ฆ Embedding and loading **DLLs** or **plugins** without filesystem exposure
- ๐Ÿš€ Building **self-contained apps** with in-memory assets
- ๐Ÿ”’ Securely managing **temporary data** and **runtime configuration**
- ๐Ÿงณ Building **portable applications** that leave no traces behind
- โšก Improving **startup performance** by avoiding disk I/O

> ๐Ÿšง๏ธ **This repository is currently under construction.**
>
> VDrive is actively being developed. Features, APIs, and internal structure are subject to change.
>
> Contributions, feedback, and issue reports are welcome as the project evolves.

## ๐Ÿ› ๏ธ Support and Resources

- ๐Ÿž **Report issues** via the [Issue Tracker](https://github.com/tinyBigGAMES/VDrive/issues).
- ๐Ÿ’ฌ **Engage in discussions** on the [Forum](https://github.com/tinyBigGAMES/VDrive/discussions) and [Discord](https://discord.gg/tPWjMwK).
- ๐Ÿ“š **Learn more** at [Learn Delphi](https://learndelphi.org).

## ๐Ÿค Contributing

Contributions to **โœจ VDrive** are highly encouraged! ๐ŸŒŸ
- ๐Ÿ› **Report Issues:** Submit issues if you encounter bugs or need help.
- ๐Ÿ’ก **Suggest Features:** Share your ideas to make **VDrive** even better.
- ๐Ÿ”ง **Create Pull Requests:** Help expand the capabilities and robustness of the library.

Your contributions make a difference! ๐Ÿ™Œโœจ

#### Contributors ๐Ÿ‘ฅ๐Ÿค



## ๐Ÿ“œ Licensing

**VDrive** is distributed under the **๐Ÿ†“ BSD-3-Clause License**, allowing for redistribution and use in both source and binary forms, with or without modification, under specific conditions.
See the [๐Ÿ“œ LICENSE](https://github.com/tinyBigGAMES/VDrive?tab=BSD-3-Clause-1-ov-file#BSD-3-Clause-1-ov-file) file for more details.

---

๐Ÿš€ Take full control of your Delphi appโ€™s resources with **VDrive** โ€” **Clean. Secure. Invisible. Fast.**


Delphi




Made with โค๏ธ in Delphi