Can be used as: input parameter and output parameter
The File type represents the content of a single file. Its contents can be read and written most easily with the value property.
Alternatively, the method write() appends new content if the parameter append is set to True.
NB: The content of the file is flushed only after the experiment finishes. Use flush() to force writing the buffered data to disk before the experiment finishes.
Read the given file and replace the current .value with the files content.
Flushes automatically afterwards.
Returns: | string – path to the file/directory |
---|
Can be used as: input parameter and output parameter
Represents the contents of directory. It can also be used with the with-keyword to change the current working directory temporarily to this directory:
with directory as dir:
# Do something with adjusted current working directory
print os.curdir
Copies the contents of the given directory to this directory.
The include closure is a function, which checks for every (absolute) path in the origin directory, if it is mirrored. If it is None, all files are included.
Generate a new File in the directory. It will be flushed automatically if the experiment is over.
Returns: | string – path to the file/directory |
---|