嵌入可执行文件系统? [英] Embedding a filesystem in an executable?

查看:221
本文介绍了嵌入可执行文件系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是好奇排序:如果我想在一个可执行文件中嵌入一个文件系统,我想我会用objcopy把刚嵌入文件系统的图像。不过,我应该使用什么样的文件系统?是否有将是一个简单的库直接访问文件系统的图像?

I'm just sort of curious: If I wanted to embed a filesystem in an executable, I assume I'd just embed an image of the filesystem using objcopy. However, what sort of filesystem should I use? Is there going to be an easy library for directly accessing the filesystem image?

我没有这方面的任何使用,所以像回应不这样做,用实际的文件,而不是都是无关紧要的。

I don't have any use for this, so responses like "don't do it, use actual files instead" are irrelevant.

推荐答案

存在所谓的虚拟文件系统实现,这是设计时考虑到自定义存储。仅举几例:我们的固体文件系统,的 codeBase的文件系统单一文件系统按AidAim。

There exist so-called virtual file system implementations, which were designed with custom storage in mind. To name a few: our Solid File System, CodeBase File System, Single File System by AidAim.

他们大多使用文件作为容器,有的(如我们的SolFS)让你自定义的地方容器,并通过回调来访问它。

Most of them use files as the container, some (eg. our SolFS) let you have container in custom places and access it via callbacks.

根据您可以使用ZIP或甚至TAR格式以及实际需求。

Depending on practical requirements you can use ZIP or even TAR format as well.

如果您希望公开包含在可执行文件到操作系统文件系统,以便其他应用程序可以读取它,那么我们的虚拟存储解决方案(CallbackDisk或回调文件系统)的人会做的工作为你在Windows上。在Linux和MacOS X的存在其他方法可以做到这一点,包括FUSE和MACFUSE库(类似物我们CBFS)。

If you want to expose the filesystem contained in your executable to the OS so that other applications could read it, then one of our virtual storage solutions (CallbackDisk or Callback File System) will do the job for you on Windows. On Linux and MacOS X there exist other ways to do this, including FUSE and MacFUSE libraries (analogs to our CBFS).

这篇关于嵌入可执行文件系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆