I can look into it within a week..or tomorrow. Whichever comes first..wait what?
I can try but I might not have time.
It's all "basically" already linux compatible, just needs compiling for linux, but I was more interested into looking at this:
[QUOTE=amcwatters;25092921]It seems to be a waste of time to use anything other than IFileSystem. You guys should just be expanding on file, not creating new libraries.[/QUOTE]
[QUOTE=Python1320;25790355]I can look into it within a week..or tomorrow. Whichever comes first..wait what?
I can try but I might not have time.[/QUOTE]
Thanks a lot.
[QUOTE=Jamie932;25788811]Has anyone had a chance to remake this for Linux? It would be very useful to myself and a few others.[/QUOTE]
Symlinks, if you just need to write some text files you should try using those.
I write vehicle scripts with file.write(), it's pretty cool.
hio linux version (If anyone's desperate enough to try this, go ahead): [url]http://g.iriz.org/~srcds/modules/[/url]
Nothing was supposed to work but apparently it can read and write files. Default permission is 0777 for CreateDirectory.
it was 5 minutes dirty port.
Have fun and don't blame me if it crashes your server.
(Oh and don't try to read nonexistent files)
Here Python, here is your new linux repo link.
[url]http://g3.iriz.uk.to/~srcds/modules/[/url]
Spent two days finding your linux module suppository.
Not to bump, but can we get a Garrys Mod 13 compile of this?
I Have Something Similar To This In My Hera Module That PreDates This The Module Is From Two Thousand And Eight And I Sent The Code To Helix And Thats The Origin Of Gm_Hio
Just wondering, I dont know anything about coding modules, but is it possible to integrate this with garrys default file system?
Like adding only one binding, file.RawOpen ?
I don't think garry uses FILE in the C++ codage so it'd be difficult.
[QUOTE=Valkyrie_;38137563]Not to bump, but can we get a Garrys Mod 13 compile of this?[/QUOTE]
I'm pretty sure it would work in gm13 without problems. I heard there was trouble with gm13 and modules though, so correct me if I am wrong.
You could change the module to use Garry's filesystem. I would recomend dropping all filesystem modules since the new file. library does it all nicely (you can even write in binary/raw mode). There have been some people complaining about the IO speeds though.
[QUOTE=SashaWolf;38155969]I'm pretty sure it would work in gm13 without problems. I heard there was trouble with gm13 and modules though, so correct me if I am wrong.[/QUOTE]
The header files changed for binary modules, such the code would have to be updated to use the new header files, or use the backwards compatible headers which allowed the old code to compile for gmod 13.
For linux the repository listed in an earlier post has a linux version for gmod 13 located at:
[URL]http://g3.iriz.uk.to/~srcds/modules/gm13/bin/gmsv_hio_linux.dll[/URL]
While for windows I changed it over to the new headers, though I think I did something wrong or odd as it ended up increasing in size most likely due to how I ported it. Though most of the code remained the same, except some functions called switched to a different name in the gmod 13 headers.
[url]http://www.solidfiles.com/d/f262e26a2f/[/url]
The link for windows includes the project if anyone wants it.
could file.find that also existed in rawio be added or is there a different method in this?
Returns a list that can be used as
[CODE]for k, v in pairs(file.Find("../directory/*.*")) do
resource.AddFile("directory/" .. v);
end[/CODE]
[QUOTE=metrotyranno;38272777]could file.find that also existed in rawio be added or is there a different method in this?
Returns a list that can be used as
[CODE]for k, v in pairs(file.Find("../directory/*.*")) do
resource.AddFile("directory/" .. v);
end[/CODE][/QUOTE]
you know file.Find requires a second argument
Anyone that got a link for the gm13 linux version?
[QUOTE=Sonic5039;38176039]
For linux the repository listed in an earlier post has a linux version for gmod 13 located at:
[URL]http://g3.iriz.uk.to/~srcds/modules/gm13/bin/gmsv_hio_linux.dll[/URL]
[/QUOTE]
[editline]20th March 2014[/editline]
Oh well, 404'd.
[QUOTE=quentuz;44301604]Anyone that got a link for the gm13 linux version?[/QUOTE]
Why did you bump a post that is 2 years old.
It's not uncommon (especially with stuff like this which you only really find through google) to get directed to a forum post by google and not notice the date.
What kind of list are you looking for?
You don't need a module to do what this did. Use the new file functions, you can open addon files and browse them: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/addon_info.txt[/url]
You can list directories in a nice format:
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/file_structure/Client_Files.txt[/url]
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/file_structure/Server_Files.txt[/url]
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/file_structure/Shared_Files.txt[/url]
which can be opened easily using the same system. Write a recursive function around this:
[lua]// Grab a list of files and folders in the current directory denoted by variable: _folder, returns a table as files and folders
local files, folders = file.Find( _folder .. "*", "MOD" );[/lua]
MOD starts inside of garrysmod/
For the lists above, I used gamemodes/ ( GM or GAMEMODE ).FolderName ... instead of that, use game.GetGamemode( ) which should return GM / GAMEMODE depending on the loadstate.
I made a simple binary module for IO operations.
[url]https://github.com/wyozi/g-ace-io[/url]
Functions at [url]https://github.com/wyozi/g-ace-io/blob/master/example/src/gm_example.cpp#L203[/url]
So for example you can list stuff with gaceio.List("./garrysmod/")
[QUOTE=Wyozi;44312614]I made a simple binary module for IO operations.
[url]https://github.com/wyozi/g-ace-io[/url]
Functions at [url]https://github.com/wyozi/g-ace-io/blob/master/example/src/gm_example.cpp#L203[/url]
So for example you can list stuff with gaceio.List("./garrysmod/")[/QUOTE]
Why?
file.CreateDir( ... ); will generate unlimited nested folders with one call.
file.Find returns files, folders with lists everything.
file.Exists tells if a dir or file exists.
file.Read/Write/Delete/Open does a lot of that.
Don't take this the wrong way but I think the only thing I could see as a benefit is if your module can run on clients without them needing it on their local machine ( which it wouldn't run anyway ), or if IsFolder doesn't get confused by files without an extension ( Albeit this can be worked around in Lua too ). The downside would be additional stuff running, if not done correctly can cause memory leaks or security flaws, C bindings take longer to access than Lua; so if you were to code it in Lua it could execute quicker.
This does the same thing as gaceio.List( "./garrysmod/" )
[lua]local _files, _folders = file.Find( "*", "MOD" );
PrintTable( _files );
PrintTable( _folders );[/lua]
Native lua io library can be found at [URL="svn://svn.metastruct.org/gbins"]svn://svn.metastruct.org/gbins[/URL]
You'll need to compile it yourself, but it shouldn't be TOO hard.
[editline]22nd March 2014[/editline]
I'll compile it if you bug me hard enough
[editline]22nd March 2014[/editline]
Windows and linux :)
[editline]22nd March 2014[/editline]
luaiox also contains luafilesystem module
[QUOTE=Acecool;44313120]Why?
file.CreateDir( ... ); will generate unlimited nested folders with one call.
file.Find returns files, folders with lists everything.
file.Exists tells if a dir or file exists.
file.Read/Write/Delete/Open does a lot of that.
Don't take this the wrong way but I think the only thing I could see as a benefit is if your module can run on clients without them needing it on their local machine ( which it wouldn't run anyway ), or if IsFolder doesn't get confused by files without an extension ( Albeit this can be worked around in Lua too ). The downside would be additional stuff running, if not done correctly can cause memory leaks or security flaws, C bindings take longer to access than Lua; so if you were to code it in Lua it could execute quicker.
This does the same thing as gaceio.List( "./garrysmod/" )
[lua]local _files, _folders = file.Find( "*", "MOD" );
PrintTable( _files );
PrintTable( _folders );[/lua][/QUOTE]
Because you can write to files outside data folder.
Sorry, you need to Log In to post a reply to this thread.