STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

File-System Library (UNIXSTL)
[UNIXSTLFile-System LibraryWinSTL]

This library provides facilities for defining and manipulating file-system objects for the Win32 API. More...

Compounds

class  basic_current_directory
 Represents the current directory. More...

class  basic_current_directory_scope
 Current directory scoping class. More...

class  basic_file_path_buffer
 Acts as a buffer with sufficient size for any drive on the host machine. More...

class  basic_path
 Represents a path. More...

class  const_iterator
 Iterator for readdir_sequence class. More...

struct  filesystem_traits
 Traits class for file-system operations. More...

class  glob_sequence
 STL-like readonly sequence based on the results of file-system wildcard matches. More...

class  glob_sequence_exception
 The exception-type thrown by the glob_sequence. More...

class  readdir_sequence
 STL-like readonly sequence based on directory contents. More...


Construction

 glob_sequence (char_type const *pattern, us_uint_t flags=noSort)
 Constructs a sequence according to the given criteria.

 glob_sequence (char_type const *directory, char_type const *pattern, us_uint_t flags=noSort)
 Constructs a sequence according to the given criteria.


Attributes

us_size_t size () const
 Returns the number of elements in the sequence.

us_bool_t empty () const
 Indicates whether the search sequence is empty.

const value_type operator[] (size_type index) const
 Returns the value corresponding to the given index.


Iteration

const_iterator begin () const
 Begins the iteration.

const_iterator end () const
 Ends the iteration.

const_reverse_iterator rbegin () const
 Begins the reverse iteration.

const_reverse_iterator rend () const
 Ends the reverse iteration.


Typedefs

typedef basic_current_directory<
us_char_a_t, filesystem_traits<
us_char_a_t > > 
current_directory_a
 Instantiation of the basic_current_directory template for the ANSI character type char.

typedef basic_current_directory<
us_char_w_t, filesystem_traits<
us_char_w_t > > 
current_directory_w
 Instantiation of the basic_current_directory template for the Unicode character type wchar_t.

typedef basic_current_directory_scope<
us_char_a_t, filesystem_traits<
us_char_a_t > > 
current_directory_scope_a
 Instantiation of the basic_current_directory_scope template for the ANSI character type char.

typedef basic_current_directory_scope<
us_char_w_t, filesystem_traits<
us_char_w_t > > 
current_directory_scope_w
 Instantiation of the basic_current_directory_scope template for the Unicode character type wchar_t.

typedef basic_file_path_buffer<
us_char_a_t,::stlsoft::malloc_allocator<
us_char_a_t > > 
file_path_buffer_a
 Instantiation of the basic_file_path_buffer template for the ANSI character type char.

typedef basic_file_path_buffer<
us_char_w_t,::stlsoft::malloc_allocator<
us_char_w_t > > 
file_path_buffer_w
 Instantiation of the basic_file_path_buffer template for the Unicode character type wchar_t.

typedef basic_path< us_char_a_t,
filesystem_traits< us_char_a_t > > 
path_a
 Instantiation of the basic_path template for the ANSI character type char.

typedef basic_path< us_char_w_t,
filesystem_traits< us_char_w_t > > 
path_w
 Instantiation of the basic_path template for the Unicode character type wchar_t.


Functions

template<typename C> basic_path< C > make_path (C const *path)
 This helper function makes a path variable without needing to qualify the template parameter.

 readdir_sequence (us_char_a_t const *directory, us_uint_t flags=directories|files)
 Constructs a sequence according to the given criteria.

const_iterator begin () const
 Begins the iteration.

const_iterator end () const
 Ends the iteration.

us_bool_t empty () const
 Indicates whether the search sequence is empty.

string_type const & get_directory () const
 The search directory.

 const_iterator ()
 Default constructor.

 const_iterator (class_type const &rhs)
 Copy constructor.

 ~const_iterator () unixstl_throw_0()
 Release the search handle.

class_type const & operator= (class_type const &rhs)
 Copy assignment operator.

value_type operator * () const
 Returns the value representative.

class_type & operator++ ()
 Moves the iteration on to the next point in the sequence, or end() if the sequence is exhausted.

class_type operator++ (int)
 Post-increment form of operator++().

bool operator== (class_type const &rhs) const
 Compares this for equality with rhs.

bool operator!= (class_type const &rhs) const
 Compares this for inequality with rhs.


Detailed Description

This library provides facilities for defining and manipulating file-system objects for the Win32 API.


Typedef Documentation

typedef basic_current_directory<us_char_a_t, filesystem_traits<us_char_a_t> > current_directory_a
 

Instantiation of the basic_current_directory template for the ANSI character type char.

typedef basic_current_directory_scope<us_char_a_t, filesystem_traits<us_char_a_t> > current_directory_scope_a
 

Instantiation of the basic_current_directory_scope template for the ANSI character type char.

typedef basic_current_directory_scope<us_char_w_t, filesystem_traits<us_char_w_t> > current_directory_scope_w
 

Instantiation of the basic_current_directory_scope template for the Unicode character type wchar_t.

typedef basic_current_directory<us_char_w_t, filesystem_traits<us_char_w_t> > current_directory_w
 

Instantiation of the basic_current_directory template for the Unicode character type wchar_t.

typedef basic_file_path_buffer<us_char_a_t, ::stlsoft:: malloc_allocator <us_char_a_t> > file_path_buffer_a
 

Instantiation of the basic_file_path_buffer template for the ANSI character type char.

typedef basic_file_path_buffer<us_char_w_t, ::stlsoft:: malloc_allocator <us_char_w_t> > file_path_buffer_w
 

Instantiation of the basic_file_path_buffer template for the Unicode character type wchar_t.

typedef basic_path<us_char_a_t, filesystem_traits<us_char_a_t> > path_a
 

Instantiation of the basic_path template for the ANSI character type char.

typedef basic_path<us_char_w_t, filesystem_traits<us_char_w_t> > path_w
 

Instantiation of the basic_path template for the Unicode character type wchar_t.


Function Documentation

readdir_sequence::const_iterator begin   [inline, inherited]
 

Begins the iteration.

Returns:
An iterator representing the start of the sequence

glob_sequence::const_iterator begin   [inline, inherited]
 

Begins the iteration.

Returns:
An iterator representing the start of the sequence

const_iterator class_type const &    rhs [inline, inherited]
 

Copy constructor.

const_iterator   [inline, inherited]
 

Default constructor.

us_bool_t empty   [inline, inherited]
 

Indicates whether the search sequence is empty.

us_bool_t empty   [inline, inherited]
 

Indicates whether the search sequence is empty.

readdir_sequence::const_iterator end   [inline, inherited]
 

Ends the iteration.

Returns:
An iterator representing the end of the sequence

glob_sequence::const_iterator end   [inline, inherited]
 

Ends the iteration.

Returns:
An iterator representing the end of the sequence

readdir_sequence::string_type const & get_directory   [inline, inherited]
 

The search directory.

Note:
The value returned by this method always has a trailing path name separator, so you can safely concatenate this with the value returned by the iterator's operator *() with minimal fuss.

glob_sequence char_type const *    directory,
char_type const *    pattern,
us_uint_t    flags = noSort
[inline, inherited]
 

Constructs a sequence according to the given criteria.

The constructor initialises a glob_sequence instance on the given pattern with the given flags.

Parameters:
directory  The directory in which the pattern is located
pattern  The pattern against which to match the file-system contents
flags  Flags to alter the behaviour of the search
Note:
If exceptions are supported, then this will throw a glob_sequence_exception on failure of any underlying functions

glob_sequence char_type const *    pattern,
us_uint_t    flags = noSort
[inline, explicit, inherited]
 

Constructs a sequence according to the given criteria.

The constructor initialises a glob_sequence instance on the given pattern with the given flags.

Parameters:
pattern  The pattern against which to match the file-system contents
flags  Flags to alter the behaviour of the search
Note:
If exceptions are supported, then this will throw a glob_sequence_exception on failure of any underlying functions

basic_path<C> make_path C const *    path [inline]
 

This helper function makes a path variable without needing to qualify the template parameter.

readdir_sequence::const_iterator::value_type operator *   [inline, inherited]
 

Returns the value representative.

bool operator!= class_type const &    rhs const [inline, inherited]
 

Compares this for inequality with rhs.

Parameters:
rhs  The instance against which to test
Return values:
false  if the iterators are equivalent
true  if the iterators are not equivalent

readdir_sequence::const_iterator::class_type operator++ int    [inline, inherited]
 

Post-increment form of operator++().

Note:
Because this version uses a temporary on which to call the pre-increment form it is thereby less efficient, and should not be used except where post-increment semantics are required.

readdir_sequence::const_iterator::class_type & operator++   [inline, inherited]
 

Moves the iteration on to the next point in the sequence, or end() if the sequence is exhausted.

readdir_sequence::const_iterator::class_type const & operator= class_type const &    rhs [inline, inherited]
 

Copy assignment operator.

bool operator== class_type const &    rhs const [inline, inherited]
 

Compares this for equality with rhs.

Parameters:
rhs  The instance against which to test
Return values:
true  if the iterators are equivalent
false  if the iterators are not equivalent

glob_sequence::value_type const operator[] size_type    index const [inline, inherited]
 

Returns the value corresponding to the given index.

Note:
In debug-mode a runtime assert is applied to enforce that the index is valid. There is no release-time checking on the index validity!

glob_sequence::const_reverse_iterator rbegin   [inline, inherited]
 

Begins the reverse iteration.

Returns:
An iterator representing the start of the reverse sequence

readdir_sequence us_char_a_t const *    directory,
us_uint_t    flags = directories|files
[inline, inherited]
 

Constructs a sequence according to the given criteria.

The constructor initialises a readdir_sequence instance on the given directory with the given flags.

Parameters:
directory  The directory whose contents are to be searched
flags  Flags to alter the behaviour of the search
Note:
The flags parameter defaults to directories | files because this reflects the default behaviour of readdir(), and also because it is the most efficient.

glob_sequence::const_reverse_iterator rend   [inline, inherited]
 

Ends the reverse iteration.

Returns:
An iterator representing the end of the reverse sequence

us_size_t size   [inline, inherited]
 

Returns the number of elements in the sequence.

~const_iterator   [inline, inherited]
 

Release the search handle.


STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004