TxtMan?
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

TxtMan?

Started by Thor, 26 June, 2009, 19:42:07

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thor

The only thing I missing in PtokaX Lua interface is TxtMan for text file management. You were able to implement the same functions for the scripts, I ask you to do this for text files. What I want are:

TxtMan.GetFiles() - returns with an array which contains the text files from the texts folder. Optionally a hash, where the keys are the filenames, and the values are the sizes in bytes.
TxtMan.GetFile(string filename) - returns with a string which is the content of the given file or nil if it doesn't exists.
TxtMan.SetFile(string filename,string content) - updates the given textfile, returns true if succeed, else nil.
TxtMan.ReloadTexts() - Reloads the text files from the texts folder.

If you can do this, I can forget pxlfs, which can couse many headache to the users on linux... Also there is no call for reloading text files now... Hope you can (rather: want to) implement these. (By the way, ProfMan.Save() would be also a good call ;)) Thank you.

CrazyGuy

Yes I agree. TxtMan is a nice extra to be added in upcoming releases (and I know PPK has planned this, it's just not finished yet) :)

Side note: There is a way to reload textfiles by API. More of a work-around than an actual call but disabling and re-enabling textfiles, which can be done by script, does do a reload and updates changed files.

SMF spam blocked by CleanTalk