webmcp
view framework/env/execute/action.lua @ 351:b1748c6c3c89
extos.stat(...) returns false (instead of nil) if file does not exist; Added extos.lstat(...) and extos.fstat(...)
| author | jbe | 
|---|---|
| date | Thu Mar 26 16:38:30 2015 +0100 (2015-03-26) | 
| parents | eb3e236d261d | 
| children | 2b5bdf9028fb | 
 line source
     1 --[[--
     2 action_status =     -- status code returned by the action (a string)
     3 execute.action{
     4   module = module,  -- module name of the action to be executed
     5   action = action,  -- name of the action to be executed
     6   id     = id,      -- id to be returned by param.get_id(...) during execution
     7   params = params   -- parameters to be returned by param.get(...) during execution
     8 }
    10 Executes an action without associated filters.
    12 --]]--
    14 function execute.action(args)
    15   local module = args.module
    16   local action = args.action
    17   trace.enter_action{ module = module, action = action }
    18   local action_status = execute.file_path{
    19     file_path = encode.file_path(
    20       WEBMCP_BASE_PATH, 'app', WEBMCP_APP_NAME, module, '_action', action .. '.lua'
    21     ),
    22     id     = args.id,
    23     params = args.params
    24   }
    25   trace.execution_return{ status = action_status }
    26   return action_status
    27 end
