boost/filesystem/convenience.hpp

convenience.hpp ヘッダは、役に立つであろう低レベル関数群を組み合わせた便利な機能を提供する。

Header convenience.hpp provides convenience functions that combine lower-level functions in useful ways.

Contents

create_directories

create_directories

void create_directories( const path & ph );

今までのコード: ph.empty() ||
forall p: p == ph || is_parent(p, ph): is_directory(p) || !exists( p )

これからのコード: exists(ph) && is_directory(ph)

Precondition: ph.empty() ||
forall p: p == ph || is_parent(p, ph): is_directory(p) || !exists( p )

Postcondition: exists(ph) && is_directory(ph)

Contributed by Vladimir Prus.


© Copyright Beman Dawes, 2002

Revised 23 December, 2002