You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ScenarioFiles.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -152,22 +152,22 @@ b b b
152
152
Takes a dictionary table as its parameter. The `choices` specifies an array of strings that are used for the parameters. The 'maxLen' specifies the maximum number of parameters, the optional `minLen` (default: 0) specifies the minimum number of parameters.
153
153
154
154
## fsCreateFile
155
-
Creates a file and, optionally, fills it with data. Takes a dictionary table as its parameter. The `fileName` specifies the file to create. Note that redirection is NOT performed on this filename. The optional `contents` value specifies the contents to write into the new file.
155
+
Creates a file and, optionally, fills it with data. Takes a dictionary table as its parameter. The `fileName` specifies the file to create. Note that redirection is NOT performed on this filename. The optional `contents` value specifies the contents to write into the new file. The filename is relative to the folder of the Scenario file.
156
156
157
157
## fsCopyFile
158
-
Copies a file. Takes a dictionary table as its parameter. The `srcFileName` value specifies the file to copy, the `dstFileName` value specifies the destination where to copy the file. Note that the destination folder must exist, this action doesn't create folders. Note that redirection is NOT performed on either of the filenames.
158
+
Copies a file. Takes a dictionary table as its parameter. The `srcFileName` value specifies the file to copy, the `dstFileName` value specifies the destination where to copy the file. Note that the destination folder must exist, this action doesn't create folders. Note that redirection is NOT performed on either of the filenames. The filenames are relative to the folder of the Scenario file.
159
159
160
160
## fsRenameFile
161
-
Renames a file. Takes a dictionary table as its parameter. The `oldFileName` value specifies the file to rename, the `newFileName` value specifies the new filename. Note that the path to `newFileName` must exist, fsRenameFile doesn't create folders. Also note that if `oldFileName` specifies a folder, the action will succeed, too (Lua's os.rename() doesn't distinguish between files and folders). Note that redirection is NOT performed on either of the filenames.
161
+
Renames a file. Takes a dictionary table as its parameter. The `oldFileName` value specifies the file to rename, the `newFileName` value specifies the new filename. Note that the path to `newFileName` must exist, fsRenameFile doesn't create folders. Also note that if `oldFileName` specifies a folder, the action will succeed, too (Lua's os.rename() doesn't distinguish between files and folders). Note that redirection is NOT performed on either of the filenames. The filenames are relative to the folder of the Scenario file.
162
162
163
163
## fsDeleteFile
164
-
Deletes a file. Takes a dictionary table as its parameter. The `fileName` value specifies the file to delete. Note that if `fileName` specifies an empty folder, the action will succeed, to (Lua's os.remove() doesn't distinguish between files and folders). Note that redirection is NOT performed on the filename.
164
+
Deletes a file. Takes a dictionary table as its parameter. The `fileName` value specifies the file to delete. Note that if `fileName` specifies an empty folder, the action will succeed, to (Lua's os.remove() doesn't distinguish between files and folders). Note that redirection is NOT performed on the filename. The filename is relative to the folder of the Scenario file.
165
165
166
166
## fsCreateFolder
167
-
Creates a folder, recursively. Takes a dictionary table as its parameter. The `path` value specifies the folder to create. It works recursively - it creates any parent folders that are needed for the final folder to be created. Performs no action if the folder already exists. Note that redirection is NOT performed on the path.
167
+
Creates a folder, recursively. Takes a dictionary table as its parameter. The `path` value specifies the folder to create. It works recursively - it creates any parent folders that are needed for the final folder to be created. Performs no action if the folder already exists. Note that redirection is NOT performed on the path. The path is relative to the folder of the Scenario file.
168
168
169
169
## fsRenameFolder
170
-
Renames a folder. Takes a dictionary table as its parameter. The `oldPath` value specifies the folder to rename, the `newPath` value specifies the new name for the folder. Note that if `oldPath` specifies a file, the action will rename the file successfully (Lua's os.rename() doesn't distinguish between files and folders). Note that redirection is not performed on either of the paths.
170
+
Renames a folder. Takes a dictionary table as its parameter. The `oldPath` value specifies the folder to rename, the `newPath` value specifies the new name for the folder. Note that if `oldPath` specifies a file, the action will rename the file successfully (Lua's os.rename() doesn't distinguish between files and folders). Note that redirection is not performed on either of the paths. The paths are relative to the folder of the Scenario file.
171
171
172
172
## fsDeleteFolder
173
-
Deletes a folder, recursively. Takes a dictionary table as its parameter. The `path` value specifies the folder to delete. The action first recursively deletes the contents of the folder, then deletes the folder itself. It may fail if `path` points to a file (depends on LuaFileSystem's handling of lfs.dir() for files). Note that redirection is NOT performed on the path.
173
+
Deletes a folder, recursively. Takes a dictionary table as its parameter. The `path` value specifies the folder to delete. The action first recursively deletes the contents of the folder, then deletes the folder itself. It may fail if `path` points to a file (depends on LuaFileSystem's handling of lfs.dir() for files). Note that redirection is NOT performed on the path. The path is relative to the folder of the Scenario file.
0 commit comments