OPH_FOLDER

Description

Type

Metadata Process.

Behaviour

It manages folders of the Ophidia filesystem.

Parameters

  • command: command to be executed among these:
    • cd: change directory
    • mkdir: create a new directory
    • rm: delete an empty directory
    • mv: move/rename a directory
  • path: 0, 1 or 2 absolute/relative paths needed by commands. In case of mv, 2 paths are mandatory parameters and must end with a name of a folder. In case of cd, without a path the new directory will be the session folder. In all other cases, it can be used only 1 path.
  • cwd: absolute path corresponding to the current working directory, necessary to correctly parse paths. All resolved paths must be associated to the calling session, so they should contain /<session-code>.

System parameters

  • exec_mode: operator execution mode. Possible values are async (default) for asynchronous mode, sync for synchronous mode with json-compliant output.
  • ncores: number of parallel processes to be used (min. 1). This operator is not parallel, so the only possible value is 1.
  • sessionid: session identifier used server-side to manage sessions and jobs. Usually, users don’t need to use/modify it, except when it is necessary to create a new session or switch to another one.
  • objkey_filter: filter on the output of the operator written to file (default=all => no filter, none => no output, folder => shows the new working directory, in case it is changed).

Examples

  • Change directory to “/absolute/path/folder1”:
[OPH_TERM] >>  oph_folder command=cd;path=folder1;cwd=/absolute/path;
  • Rename folder “/absolute/path/folder1” to “/absolute/path/folder2”:
[OPH_TERM] >>  oph_folder command=mv;path=folder1|folder2;cwd=/absolute/path;

Arguments

Argument name Type Mandatory Values Default Min/Max-value
command “string” “yes” “cd|mkdir|rm|mv”    
path “string” “no”   “-“  
cwd “string” “yes”      
exec_mode “string” “no” “async|sync” “async”  
sessionid “string” “no”   “null”  
ncores “int” “no”   “1” “1” / “1”
objkey_filter “string” “no” “all|none|folder” “all”