win.CreateDir

LuaFAR 3

win.CreateDir


result = win.CreateDir (path [, flags])

Parameters:
  path:     string
  flags:    string (set of characters; optional)
              't' - stands for 'tolerant'
              'o' - stands for 'original'
              default: ''

Returns:
  result:   true (or: nil, errormessage)

Description:
  This function creates a directory specified by the path parameter.
  Nested directories can be created by a single call.

  Flag 't': If the target directory already exists, then the function returns true.
  Flag 'o': The function will not attempt to create nested directories.
            The path argument is passed to CreateDirectoryW as is.

Note:
  For backwards compatibility, a non-string true value passed as the 2-nd parameter
  is equivalent to flags=='t'.

Windows API used:
  CreateDirectoryW