summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-01-20 10:18:45 +0000
committerSteven Barth <steven@midlink.org>2009-01-20 10:18:45 +0000
commit514a9bfec70e393b3c27d625237ba0578789a8a9 (patch)
tree99cd3f7a499acf5d10dfb4b2ded2c4b074f37485 /libs
parenteedf5359965d8076eca3dc2e8aac002e04ed3525 (diff)
Add utime to luci.fs
Diffstat (limited to 'libs')
-rw-r--r--libs/core/luasrc/fs.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/core/luasrc/fs.lua b/libs/core/luasrc/fs.lua
index 830536cbe..d4247d783 100644
--- a/libs/core/luasrc/fs.lua
+++ b/libs/core/luasrc/fs.lua
@@ -136,6 +136,15 @@ function mtime(path)
return posix.stat(path, "mtime")
end
+--- Set the last modification time of given file path in Unix epoch format.
+-- @param path String containing the path of the file or directory to read
+-- @param mtime Last modification timestamp
+-- @param atime Last accessed timestamp
+-- @return 0 in case of success nil on error
+-- @return String containing the error description (if any)
+-- @return Number containing the os specific errno (if any)
+utime = posix.utime
+
--- Return the last element - usually the filename - from the given path with
-- the directory component stripped.
-- @class function