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