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  

filesystem_traits Struct Template Reference
[File-System Library (UNIXSTL)]

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

#include <unixstl_filesystem_traits.h>

List of all members.

Public Types

typedef C char_type
typedef us_size_t size_type

Static Public Methods

char_typestr_copy (char_type *dest, char_type const *src)
 Copies the contents of src to dest.

char_typestr_n_copy (char_type *dest, char_type const *src, us_size_t cch)
 Copies the contents of src to dest, up to cch characters.

char_typestr_cat (char_type *dest, char_type const *src)
 Appends the contents of src to dest.

us_int_t str_compare (char_type const *s1, char_type const *s2)
 Comparies the contents of src and dest.

us_int_t str_compare_no_case (char_type const *s1, char_type const *s2)
 Comparies the contents of src and dest in a case-insensitive fashion.

size_type str_len (char_type const *src)
 Evaluates the length of src.

char_typestr_chr (char_type const *s, char_type ch)
 Finds the given character ch in s.

char_typestr_rchr (char_type const *s, char_type ch)
 Finds the rightmost instance ch in s.

char_typestr_str (char_type const *s, char_type const *sub)
 Finds the given substring sub in s.

char_typeensure_dir_end (char_type *dir)
 Appends a path name separator to dir if one does not exist.

char_typeremove_dir_end (char_type *dir)
 Removes the path name separator from the end of dir, if it has it.

us_bool_t has_dir_end (char_type const *dir)
 Returns true if dir has trailing path name separator.

us_bool_t is_dots (char_type const *dir)
 Returns true if dir is "." or "..".

us_bool_t is_path_rooted (char_type const *path)
 Returns true if path is rooted.

us_bool_t is_path_absolute (char_type const *path)
 Returns true if path is an absolute path.

char_type path_separator ()
 Returns the path separator.

char_type path_name_separator ()
 Returns the path name separator.

char_type const * pattern_all ()
 Returns the wildcard pattern that represents all possible matches.

us_size_t path_max ()
 The maximum length of a path on the file-system.

us_size_t get_full_path_name (char_type const *fileName, us_size_t cchBuffer, char_type *buffer, char_type **ppFile)
 Gets the full path name into the given buffer, returning a pointer to the file-part.

us_size_t get_full_path_name (char_type const *fileName, us_size_t cchBuffer, char_type *buffer)
 Gets the full path name into the given buffer.

us_bool_t set_current_directory (char_type const *dir)
 Sets the current directory to dir.

us_uint_t get_current_directory (us_uint_t cchBuffer, char_type *buffer)
 Retrieves the name of the current directory into buffer up to a maximum of cchBuffer characters.

us_bool_t file_exists (char_type const *fileName)
 Returns whether a file exists or not.

us_bool_t is_file (char_type const *path)
 Returns whether the given path represents a file.

us_bool_t is_directory (char_type const *path)
 Returns whether the given path represents a directory.

us_uint_t get_environment_variable (char_type const *name, char_type *buffer, us_uint_t cchBuffer)
 Gets an environment variable into the given buffer.

us_uint_t expand_environment_strings (char_type const *src, char_type *buffer, us_uint_t cchBuffer)
 Expands environment strings in src into \dest, up to a maximum cchDest characters.


Detailed Description

template<typename C>
struct unixstl::filesystem_traits< C >

Traits class for file-system operations.

Parameters:
C  The character type (e.g. char, wchar_t)


Member Typedef Documentation

typedef C char_type
 

The character type

typedef us_size_t size_type
 

The size type


Member Function Documentation

char_type* ensure_dir_end char_type   dir [static]
 

Appends a path name separator to dir if one does not exist.

See also:
path_name_separator()

us_uint_t expand_environment_strings char_type const *    src,
char_type   buffer,
us_uint_t    cchBuffer
[static]
 

Expands environment strings in src into \dest, up to a maximum cchDest characters.

us_bool_t file_exists char_type const *    fileName [static]
 

Returns whether a file exists or not.

us_uint_t get_current_directory us_uint_t    cchBuffer,
char_type   buffer
[static]
 

Retrieves the name of the current directory into buffer up to a maximum of cchBuffer characters.

us_uint_t get_environment_variable char_type const *    name,
char_type   buffer,
us_uint_t    cchBuffer
[static]
 

Gets an environment variable into the given buffer.

Parameters:
name  The name of the variable to find
buffer  The buffer in which to write the variable. If this is NULL, then the required length is returned
cchBuffer  The size of the buffer, in characters

us_size_t get_full_path_name char_type const *    fileName,
us_size_t    cchBuffer,
char_type   buffer
[static]
 

Gets the full path name into the given buffer.

us_size_t get_full_path_name char_type const *    fileName,
us_size_t    cchBuffer,
char_type   buffer,
char_type **    ppFile
[static]
 

Gets the full path name into the given buffer, returning a pointer to the file-part.

us_bool_t has_dir_end char_type const *    dir [static]
 

Returns true if dir has trailing path name separator.

See also:
path_name_separator()

us_bool_t is_directory char_type const *    path [static]
 

Returns whether the given path represents a directory.

us_bool_t is_dots char_type const *    dir [static]
 

Returns true if dir is "." or "..".

us_bool_t is_file char_type const *    path [static]
 

Returns whether the given path represents a file.

us_bool_t is_path_absolute char_type const *    path [static]
 

Returns true if path is an absolute path.

us_bool_t is_path_rooted char_type const *    path [static]
 

Returns true if path is rooted.

us_size_t path_max   [static]
 

The maximum length of a path on the file-system.

Note:
Because not all systems support fixed maximum path lengths, the value of this function is notionally dynamic

char_type path_name_separator   [static]
 

Returns the path name separator.

This is the separator that is used to separate parts of a path on the operating system. On UNIX it is '/'

char_type path_separator   [static]
 

Returns the path separator.

This is the separator that is used to separate multiple paths on the operating system. On UNIX it is ':'

char_type const* pattern_all   [static]
 

Returns the wildcard pattern that represents all possible matches.

Note:
On UNIX it is '*'

char_type* remove_dir_end char_type   dir [static]
 

Removes the path name separator from the end of dir, if it has it.

See also:
path_name_separator()

us_bool_t set_current_directory char_type const *    dir [static]
 

Sets the current directory to dir.

char_type* str_cat char_type   dest,
char_type const *    src
[static]
 

Appends the contents of src to dest.

char_type* str_chr char_type const *    s,
char_type    ch
[static]
 

Finds the given character ch in s.

us_int_t str_compare char_type const *    s1,
char_type const *    s2
[static]
 

Comparies the contents of src and dest.

us_int_t str_compare_no_case char_type const *    s1,
char_type const *    s2
[static]
 

Comparies the contents of src and dest in a case-insensitive fashion.

char_type* str_copy char_type   dest,
char_type const *    src
[static]
 

Copies the contents of src to dest.

size_type str_len char_type const *    src [static]
 

Evaluates the length of src.

char_type* str_n_copy char_type   dest,
char_type const *    src,
us_size_t    cch
[static]
 

Copies the contents of src to dest, up to cch characters.

char_type* str_rchr char_type const *    s,
char_type    ch
[static]
 

Finds the rightmost instance ch in s.

char_type* str_str char_type const *    s,
char_type const *    sub
[static]
 

Finds the given substring sub in s.


The documentation for this struct was generated from the following file:

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