Is it possible to have one file = multiple file contents in real time?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possible to have one file = multiple file contents in real time?
So I have a game that reads a permissions file. With out having to modify the game code(java based) I would like to have the permissions file that the game loads contain multiple base files in a specified order.
Basically I need it to contain in order: [header], [players], [groups], [world], [footer] as source files
I know this is possible from a basic CLI scripting standpoint, but is this possible from a file system standpoint so that any time the permissions file is read the file system automatically loads the base files into the combined permissions file in real time so the game is unaware.
PS. This will be for read only, and if needed I can always use overlay to have any writes goto a separate file which can be parsed to its separate base files and then removed via a script as writes would be un-common ( in terms of frequency ) but are formatted a specific way due to YAML
You need to explain what you mean by 'the permissions file that the game loads contain multiple base files'. Files do not contain other files.
If I guess correctly, your intention is to modify some file(s) at runtime (based on something unspecified). The only solution I can envision for this is to code up a virtual filesystem that your game can use to read files from. The virtual filesystem (based on fuse) is then capable of providing file content based on whatever circumstance your code can determine. It can be essentially a wedge between the real filesystem, and your game application.
It seems to me that asking the underlying system to do something that really should be handled by the application is the wrong way to be thinking about it.
I agree, but from the wording of the question 'I have a game...', I doubt it is within the control of the OP to make any changes at the application level. Sometimes you just have to find a more creative solution. The word 'workaround' was coined for a reason.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.