mmengine.fileio.put_text¶
- mmengine.fileio.put_text(obj, filepath, backend_args=None)[source]¶
Write text to a given
filepath
with ‘w’ mode.Note
put_text
should create a directory if the directory offilepath
does not exist.- Parameters:
- Return type:
None
Examples
>>> filepath = '/path/of/file' >>> put_text('hello world', filepath)