LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-17-2012, 06:06 AM   #1
omegatotal
LQ Newbie
 
Registered: Dec 2012
Posts: 1

Rep: Reputation: Disabled
Question 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
 
Old 12-18-2012, 07:53 AM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 8,248
Blog Entries: 11

Rep: Reputation: 2287Reputation: 2287Reputation: 2287Reputation: 2287Reputation: 2287Reputation: 2287Reputation: 2287Reputation: 2287Reputation: 2287Reputation: 2287Reputation: 2287
Quote:
Originally Posted by omegatotal View Post
...I would like to have the permissions file that the game loads contain multiple base files in a specified order....
That's nice. I'd like Free Ice Cream.

Post the permissions file.
 
Old 12-18-2012, 09:22 AM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

--- rod.
 
Old 12-19-2012, 12:22 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
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.
 
Old 12-19-2012, 12:38 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare two folders(recursively) for file names and file contents alaios Linux - Software 5 05-04-2012 01:40 AM
[SOLVED] Using Expect/TCL to move contents of a text file to an executable file jefsa Linux - Newbie 4 04-20-2012 10:43 AM
Sort pcap file contents by file date zakiakhmad Linux - Networking 5 01-03-2012 06:40 AM
Create a Multiple files by reading a input file and changing the contents bhargavkr Linux - Newbie 4 09-17-2009 12:37 AM
Bash remove part of a file based on contents of another file bhepdogg Programming 4 01-31-2007 03:13 PM


All times are GMT -5. The time now is 03:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration