mirror of
https://github.com/boostorg/filesystem.git
synced 2026-01-29 19:42:08 +00:00
Add predicate function overloads on status_flags (Suggested by Martin Adrian)
[SVN r32196]
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
<a href="#Do-the-right-thing">"Do-the-right-thing" rule</a><br>
|
||||
<a href="#status">status</a><br>
|
||||
<a href="#exists">exists</a><br>
|
||||
<a href="#is_file">is_directory</a><br>
|
||||
<a href="#is_error">is_error</a><br>
|
||||
<a href="#is_directory">is_directory</a><br>
|
||||
<a href="#is_file">is_file</a><br>
|
||||
<a href="#is_symlink">is_symlink</a><br>
|
||||
<a href="#is_empty">is_empty</a><br>
|
||||
@@ -145,10 +146,16 @@ header. </p>
|
||||
template<class Path> status_flags <a href="#status">status</a>( const Path & ph, const symlink_t &, system_error_type * ec = 0 );
|
||||
|
||||
template<class Path> bool <a href="#exists">exists</a>( const Path & ph );
|
||||
bool exists( status_flags f );
|
||||
bool is_error( status_flags f );
|
||||
template<class Path> bool <a href="#is_file">is_directory</a>( const <code>Path</code> & ph );
|
||||
bool is_directory( status_flags f );
|
||||
template<class Path> bool <a href="#is_file">is_file</a>( const <code>Path</code> & ph );
|
||||
bool is_file( status_flags f );
|
||||
template<class Path> bool <a href="#is_other">is_other</a>( const <code>Path</code> & ph );
|
||||
bool is_other( status_flags f );
|
||||
template<class Path> bool <a href="#is_symlink">is_symlink</a>( const <code>Path</code> & ph );
|
||||
bool is_symlink( status_flags f );
|
||||
template<class Path> bool <a href="#is_empty">is_empty</a>( const <code>Path</code> & ph );
|
||||
template<class Path> bool <a href="#equivalent">equivalent</a>( const <code>Path</code> & ph1, const <code>Path</code> & ph2 );
|
||||
template<class Path> boost::intmax_t <a href="#file_size">file_size</a>( const <code>Path</code> & ph );
|
||||
@@ -405,24 +412,44 @@ will be portable to systems like POSIX, where symbolic links may be present.</p>
|
||||
<p><code>template<class Path> bool exists( const Path & ph );</code></p>
|
||||
<p><b>Throws:</b> If <code>status(</code>ph<code>) == error_flag</code>.</p>
|
||||
<p><b>Returns:</b> <code>status(ph) != not_found_flag</code></p>
|
||||
<p><code>bool is_exists( status_flags f );</code></p>
|
||||
<p><b><span style="background-color: #FFFFFF">Returns:</span></b><span style="background-color: #FFFFFF"><b>
|
||||
</b>
|
||||
</span><code><span style="background-color: #FFFFFF">f != 0 && ((f &
|
||||
not_found_flag) == 0)</span></code></p>
|
||||
</blockquote>
|
||||
<h3><a name="is_error">is_error</a></h3>
|
||||
<blockquote>
|
||||
<pre><span style="background-color: #FFFFFF">bool is_<a name="exists">error</a>( status_flags f );</span></pre>
|
||||
<p><b><span style="background-color: #FFFFFF">Returns:</span></b><span style="background-color: #FFFFFF"><b>
|
||||
</b><code>(f & error_flag) != 0</code></span></p>
|
||||
</blockquote>
|
||||
<h3><a name="is_directory">is_directory</a></h3>
|
||||
<blockquote>
|
||||
<p><code>template<class Path> bool is_directory( const Path & ph );</code></p>
|
||||
<p><b>Throws:</b> If <code>status(ph) == error_flag</code>.</p>
|
||||
<p><b>Returns:</b> <code>(status(ph) & directory_flag) != 0</code></p>
|
||||
<pre><span style="background-color: #FFFFFF">bool </span><code><span style="background-color: #FFFFFF">is_directory</span></code><span style="background-color: #FFFFFF">( status_flags f );</span></pre>
|
||||
<p><span style="background-color: #FFFFFF"><b>Returns: </b><code>(f &
|
||||
directory_flag) != 0</code></span></p>
|
||||
</blockquote>
|
||||
<h3><a name="is_file">is_file</a></h3>
|
||||
<blockquote>
|
||||
<p><code>template<class Path> bool is_file( const Path & ph );</code></p>
|
||||
<p><b>Throws:</b> If <code>status(ph) == error_flag</code>.</p>
|
||||
<p><b>Returns:</b> <code>(status(ph) & file_flag) != 0</code></p>
|
||||
<pre><span style="background-color: #FFFFFF">bool </span><code><span style="background-color: #FFFFFF">is_file</span></code><span style="background-color: #FFFFFF">( status_flags f );</span></pre>
|
||||
<p><span style="background-color: #FFFFFF"><b>Returns: </b><code>(f &
|
||||
file_flag) != 0</code></span></p>
|
||||
</blockquote>
|
||||
<h3><a name="is_other">is_other</a></h3>
|
||||
<blockquote>
|
||||
<p><code>template<class Path> bool is_other( const Path & ph );</code></p>
|
||||
<p><b>Throws:</b> If <code>status(ph) == error_flag</code>.</p>
|
||||
<p><b>Returns:</b> <code>(status(ph) & other_flag) != 0</code></p>
|
||||
<pre><span style="background-color: #FFFFFF">bool <a name="exists">is_other</a>( status_flags f );</span></pre>
|
||||
<p><span style="background-color: #FFFFFF"><b>Returns:</b> <code>(f &
|
||||
other_flag) != 0</code></span></p>
|
||||
</blockquote>
|
||||
<h3><a name="is_symlink">is_symlink</a></h3>
|
||||
<blockquote>
|
||||
@@ -432,6 +459,9 @@ template<class DirItr> bool is_symlink( const DirItr & ph );</code></p
|
||||
differences between behavior of Path and DirItr template signatures.</p>
|
||||
<p><b>Throws:</b> If <code>symlink_status(ph) == error_flag</code>.</p>
|
||||
<p><b>Returns:</b> <code>symlink_status(ph) == symlink_flag)</code></p>
|
||||
<pre><span style="background-color: #FFFFFF">bool <a name="exists">is_symlink</a>( status_flags f );</span></pre>
|
||||
<p><span style="background-color: #FFFFFF"><b>Returns: </b><code>(f &
|
||||
symlink_flag) != 0</code></span></p>
|
||||
</blockquote>
|
||||
<h3><a name="is_empty">is_empty</a></h3>
|
||||
<blockquote>
|
||||
@@ -819,7 +849,7 @@ by a prior program run by the command processor.</p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->28 December, 2005<!--webbot bot="Timestamp" endspan i-checksum="38523" --></p>
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 January, 2006<!--webbot bot="Timestamp" endspan i-checksum="38950" --></p>
|
||||
<p>© Copyright Beman Dawes, 2002</p>
|
||||
<p> Use, modification, and distribution are subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt">
|
||||
|
||||
Reference in New Issue
Block a user