method resource.filesystem.file.set_file_content_and_create_folders_as_needed
Set file content, creating a new file in a new path if necessary
Contract
Return typewob
Parameter keyDefault valueType
new_contentreq
Water Contract
<method resource.filesystem.file.set_file_content_and_create_folders_as_needed
  new_content=req/>

See also: file, folder, create, exists, set

Sets the content of the specified file, creating a new file in a new path if necessary, and returns the new content. If the file already exists, this method will overwrite the old contents. If an error occurs during execution, this method will throw an error.

a wob
Parameter keyDefault valueType
new_contentreq
If the object written to the file as new_content is not a string, it will be converted before it is written. See documentation for the set method for more details.

Example: Create a new file with a new path
<file "logical://user/new_folder/test_file.txt" />.
<set_file_content_and_create_folders_as_needed new_content="old stuff" />