streams.outfile.html

来自「PTypes (C++ Portable Types Library) is a」· HTML 代码 · 共 48 行

HTML
48
字号
<html><!-- #BeginTemplate "/Templates/tmpl.dwt" --><head><!-- #BeginEditable "doctitle" --> <title>PTypes: streams: outfile</title><!-- #EndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="styles.css"></head><body bgcolor="#FFFFFF" leftmargin="40" marginwidth="40"><p><a href="../index.html"><img src="title-1.7.gif" width="213" height="34" alt="C++ Portable Types Library (PTypes) Version 1.7" border="0"></a> <hr noshade><!-- #BeginEditable "body" --> <p class="hpath"><a href="index.html">Top</a>: <a href="streams.html">Streams</a>: outfile </p><blockquote> <pre class="lang">#include &lt;pstreams.h&gt;outfile::outfile( [ const string& filename, bool append = false ] );string outfile::get/set_filename();bool outfile::get/set_append();int outfile::get/set_umode();</pre></blockquote><p>This class derives all public methods and properties from <a href="streams.iobase.html">iobase</a> and <a href="streams.outstm.html">outstm</a>, and in addition defines the following:</p><p><span class="def">outfile::outfile( [ const string&amp; filename, bool append = false ] )</span> creates an output file stream, but does not open the file. When opening a file with <span class="lang">open()</span>, it is truncated to zero unless <span class="lang">append</span> property is set to true. <span class="lang">Filename</span> and <span class="lang">append</span> parameters are optional.</p><p><span class="def">string outfile::get/set_filename()</span> sets the filename. <span class="lang">set_filename()</span> closes the stream prior to assigning the new value.</p><p><span class="def">bool outfile::get/set_append()</span> -- if set to true, the file pointer is set beyond the last byte of the file when opening the stream with <span class="lang">open()</span>.</p><p><span class="def">int outfile::get/set_umode()</span> sets UNIX file mode when creating a new file. By default a file is created with <span class="lang">0644</span> octal, which on UNIX means read/write access for the owner and read-only access for group members and all others. This property has no effect on Windows.</p><p class="seealso">See also: <a href="streams.iobase.html">iobase</a>, <a href="streams.outstm.html">outstm</a>, <a href="streams.examples.html">Examples</a></p><!-- #EndEditable --><hr size="1"><a href="../index.html" class="ns">PTypes home</a></body><!-- #EndTemplate --></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?