summaryrefslogtreecommitdiffstats
path: root/lib/fs.lua
Commit message (Collapse)AuthorAgeFilesLines
* Moved non-ACF-specific libraries to acf-lib package, moved cfe_unpack ↵Ted Trask2009-12-311-222/+0
| | | | function to viewfunctions library.
* Fix fs.find bug that returned invalid file.Ted Trask2009-12-281-1/+1
|
* Cleaned up fs library use of posix.basename / dirname.Ted Trask2009-12-281-11/+15
|
* Removed redundant/buggy basename and dirname functions. Added ↵Ted Trask2009-12-281-27/+11
| | | | | | | parse_redir_string to www controller. Removed basename and dirname from mvc and fs, use posix functions instead. parse_path_info was buggy and used 2 ways, rewrote and created parse_redir_string for backwards parsing.
* Fixed bug with roles, added follow symlink flag for fs.find, allowed ↵Ted Trask2009-12-221-5/+19
| | | | | | symlinks in /usr/share/acf/app. Controllers with same name but different prefix were not correct in roles.
* Modified copy_file and move_file to overwrite existing file, only fail if ↵Ted Trask2009-05-271-4/+4
| | | | existing directory.
* Added fs.move_file function because os.rename only works on same device.Ted Trask2009-05-151-0/+22
|
* Fixed bug in fs.find_files_as_array.Ted Trask2009-01-301-3/+4
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1698 ab2d0c66-481e-0410-8bed-d214d4d58bed
* More work to remove unnecessary popen calls.Ted Trask2009-01-261-5/+18
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1696 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Started process of removing as many io.popen calls as possible. Not complete.Ted Trask2009-01-241-19/+35
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1695 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Modifed fs.lua to remove unnecessary calls to io.popen.Ted Trask2009-01-231-19/+8
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1694 ab2d0c66-481e-0410-8bed-d214d4d58bed
* use posix.mkdir() to create dirs recursivelyNatanael Copa2009-01-231-4/+7
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1693 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Added escapespecialcharacters to format.lua to escape shell special ↵release-0.4.19Ted Trask2009-01-211-5/+6
| | | | | | characters. Reviewed all calls to io.popen and os.execute to escape special characters. Fixed file uploads in openssl and ipsectools with viewfunctions.lua. Tried to fix openssl renew when subject contains special characters, but not done yet. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1687 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Modified fs.lua to survive nil parameters. Added create_directory and used ↵Ted Trask2009-01-131-16/+44
| | | | | | within create_file and write_file. Reviewed each read_file call to make sure handles nil return value. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1677 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Removed getopts library and added functionality to format library as ↵Ted Trask2008-09-291-1/+1
| | | | | | opts_to_table, table_to_opts, parse_configfile2, update_configfile2, get_section, and set_section. New functions work on strings, not files. Modified all code using getopts to use format instead. Fixed nil string bugs in TCPProxy. Fixed forward only bug in DNSCache. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1535 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Cleanup of some libs.Ted Trask2008-09-261-13/+0
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1533 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Workaround in fs.lua for exception caused by posix.files when directory ↵Ted Trask2008-09-241-6/+8
| | | | | | doesn't exist. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1491 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Another rewrite of validator to remove dnsfiles and add a generic way for ↵Ted Trask2008-07-241-1/+8
| | | | | | other controllers to save user-based settings. Also added fs.create_file function. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1317 ab2d0c66-481e-0410-8bed-d214d4d58bed
* If no details for the file exists, then things got broken. This is now fixed.Mika Havela2008-05-061-12/+14
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1107 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Removed trailing newline. The files gets really ugly with leading \n.Mika Havela2008-02-201-1/+1
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@759 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Updated the code to use md5sums in the acf passwd file. Made the ↵Mike Mason2008-01-301-0/+12
| | | | | | md5sum_string function(to go along with md5sum_file) in fs git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@665 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Added function that does almost the same as posix.stat, but instead writes ↵Mika Havela2008-01-151-0/+17
| | | | | | human readable. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@577 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Added an md5sum hash function to fs.lua. Cron-model and cron-controller ↵Mike Mason2007-12-131-0/+8
| | | | | | added just to grab and edit the crontab file. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@424 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Made validator functions useful after load, fixed a bug in format, changed ↵Mike Mason2007-12-051-1/+1
| | | | | | README to reflect changes git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@413 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Added timezone information to date.lua. Added fs.file_write to be able to ↵Mike Mason2007-12-041-0/+2
| | | | | | add newlines at the end of the file(most strings don't have them) and also added a function to format.lua git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@408 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Lots of changes. fs.lua now only has file/filesystem functions. format.lua ↵Mike Mason2007-11-281-83/+0
| | | | | | added to be convert/sytle format changes. join.lua and split.lua put in format now. May delete later. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@385 ab2d0c66-481e-0410-8bed-d214d4d58bed
* added split and join to fs.lua and gave them function names so we don't have ↵Mike Mason2007-11-281-0/+36
| | | | | | to strsplit = require split. Added a date string to table function in date.lua git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@378 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Added ipairs_string to go through a table and make it a string. Easier to ↵Mike Mason2007-11-221-0/+15
| | | | | | write to a file with write_file git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@357 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Added a search replace function for filesMike Mason2007-11-221-1/+14
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@356 ab2d0c66-481e-0410-8bed-d214d4d58bed
* adding more functions to fs. May need to go into a file.luaMike Mason2007-11-151-3/+37
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@307 ab2d0c66-481e-0410-8bed-d214d4d58bed
* Changed to use posix instead of lfsMike Mason2007-11-141-6/+12
| | | | git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@302 ab2d0c66-481e-0410-8bed-d214d4d58bed
* moved core files to new dir structurev2.0_alpha1Natanael Copa2007-07-271-0/+89
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@219 ab2d0c66-481e-0410-8bed-d214d4d58bed