MCPcopy Create free account
hub / github.com/boostorg/build / write

Method write

v2/test/TestCmd.py:573–589  ·  view source on GitHub ↗

Writes the specified content text (second argument) to the specified file name (first argument). The file name may be a list, in which case the elements are concatenated using the os.path.join() method. The file is created under the temporary working directory. Any

(self, file, content, mode='wb')

Source from the content-addressed store, hash-verified

571 pass # Ignore any problems changing modes.
572
573 def write(self, file, content, mode='wb'):
574 """
575 Writes the specified content text (second argument) to the specified
576 file name (first argument). The file name may be a list, in which case
577 the elements are concatenated using the os.path.join() method. The file
578 is created under the temporary working directory. Any subdirectories in
579 the path must already exist. The I/O mode for the file may be specified
580 and must begin with a 'w'. The default is 'wb' (binary write).
581
582 """
583 if type(file) is ListType:
584 file = apply(os.path.join, tuple(file))
585 if not os.path.isabs(file):
586 file = os.path.join(self.workdir, file)
587 if mode[0] != 'w':
588 raise ValueError, "mode must begin with 'w'"
589 open(file, mode).write(content)

Callers 15

foo.pyFile · 0.45
inline_file.pyFile · 0.45
mainFunction · 0.45
editFunction · 0.45
composite.pyFile · 0.45
core_option_d2.pyFile · 0.45
test_tag_propertyFunction · 0.45
inline.pyFile · 0.45
core_bindrule.pyFile · 0.45
suffix.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected