@staticmethod<EOL><INDENT>def with_data(path, data):<DEDENT>
<EOL>if isinstance(data, str):<EOL><INDENT>data = json.loads(data)<EOL><DEDENT>if os.path.exists(path):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>f = File(path)<EOL>f.data = data<EOL>return f<EOL><DEDENT>
Initialize a new file that starts out with some data. Pass data
        as a list, dict, or JSON string.