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 (InetSTL)]

Traits for accessing the correct file-system functions for a given character type. More...

#include <inetstl_filesystem_traits.h>

List of all members.

Public Types

typedef C char_type
 The character type.

typedef is_size_t size_type
 The size type.

typedef is_ptrdiff_t difference_type
 The difference type.

typedef WIN32_FIND_DATA find_data_type
 The find data 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, is_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.

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

is_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.

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

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

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

is_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.

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

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

HINTERNET internet_open (char_type const *agent, is_dword_t accessType, char_type const *proxy, char_type const *proxyBypass, is_dword_t flags)
 Opens a WinInet session.

HINTERNET internet_connect (HINTERNET hsess, char_type const *server, INTERNET_PORT port, char_type const *userName, char_type const *password, is_dword_t service, is_dword_t flags, is_dword_t context)
 Makes a connection to a FTP or HTTP site.

void close_connection (HINTERNET hconn)
 Closes the connection to the FTP or HTTP site.

HINTERNET find_first_file (HINTERNET hconn, char_type const *spec, find_data_type *findData, is_dword_t flags=0, is_dword_t context=0)
 Initiate a file-system search.

is_bool_t find_next_file (HANDLE h, find_data_type *findData)
 Advance a given file-system search.

void find_close (HINTERNET hfind)
 Closes the file-search.

is_bool_t set_current_directory (HINTERNET hconn, char_type const *dir)
 Sets the current directory to dir.

is_uint_t get_current_directory (HINTERNET hconn, is_size_t &cchBuffer, char_type *buffer)
 Retrieves the name of the current directory into buffer up to a maximum of cchBuffer characters.

is_bool_t file_exists (HINTERNET hconn, char_type const *fileName)
 Returns whether a file exists or not.

is_bool_t create_directory (HINTERNET hconn, char_type const *dir)
 Creates a directory.

is_bool_t remove_directory (HINTERNET hconn, char_type const *dir)
 Deletes a directory.

is_bool_t delete_file (HINTERNET hconn, char_type const *file)
 Delete a file.

is_bool_t rename_file (HINTERNET hconn, char_type const *currentName, char_type const *newName)
 Rename a file.


Detailed Description

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

Traits for accessing the correct file-system functions for a given character type.

filesystem_traits is a traits class for determining the correct file-system structures and functions for a given character type.

Parameters:
C  The character type


Member Typedef Documentation

typedef C char_type
 

The character type.

typedef is_ptrdiff_t difference_type
 

The difference type.

typedef WIN32_FIND_DATA find_data_type
 

The find data type.

typedef is_size_t size_type
 

The size type.


Member Function Documentation

void close_connection HINTERNET    hconn [static]
 

Closes the connection to the FTP or HTTP site.

is_bool_t create_directory HINTERNET    hconn,
char_type const *    dir
[static]
 

Creates a directory.

is_bool_t delete_file HINTERNET    hconn,
char_type const *    file
[static]
 

Delete a file.

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()

is_bool_t file_exists HINTERNET    hconn,
char_type const *    fileName
[static]
 

Returns whether a file exists or not.

void find_close HINTERNET    hfind [static]
 

Closes the file-search.

HINTERNET find_first_file HINTERNET    hconn,
char_type const *    spec,
find_data_type   findData,
is_dword_t    flags = 0,
is_dword_t    context = 0
[static]
 

Initiate a file-system search.

is_bool_t find_next_file HANDLE    h,
find_data_type   findData
[static]
 

Advance a given file-system search.

is_uint_t get_current_directory HINTERNET    hconn,
is_size_t   cchBuffer,
char_type   buffer
[static]
 

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

is_dword_t get_full_path_name HINTERNET    hconn,
char_type const *    fileName,
is_dword_t    cchBuffer,
char_type   buffer
[static]
 

Gets the full path name into the given buffer.

is_dword_t get_full_path_name HINTERNET    hconn,
char_type const *    fileName,
is_dword_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.

is_bool_t has_dir_end char_type const *    dir [static]
 

Returns true if dir has trailing path name separator.

See also:
path_name_separator()

HINTERNET internet_connect HINTERNET    hsess,
char_type const *    server,
INTERNET_PORT    port,
char_type const *    userName,
char_type const *    password,
is_dword_t    service,
is_dword_t    flags,
is_dword_t    context
[static]
 

Makes a connection to a FTP or HTTP site.

HINTERNET internet_open char_type const *    agent,
is_dword_t    accessType,
char_type const *    proxy,
char_type const *    proxyBypass,
is_dword_t    flags
[static]
 

Opens a WinInet session.

is_bool_t is_dots char_type const *    dir [static]
 

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

is_bool_t is_path_absolute char_type const *    path [static]
 

Returns true if path is an absolute path.

is_bool_t is_path_rooted char_type const *    path [static]
 

Returns true if path is rooted.

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:
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()

is_bool_t remove_directory HINTERNET    hconn,
char_type const *    dir
[static]
 

Deletes a directory.

is_bool_t rename_file HINTERNET    hconn,
char_type const *    currentName,
char_type const *    newName
[static]
 

Rename a file.

is_bool_t set_current_directory HINTERNET    hconn,
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.

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

Comparies the contents of src and dest.

is_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,
is_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