ntfspath.h File Reference

#include <tchar.h>
#include <windows.h>

Typedefs

typedef enum _err_codes err_codes

Enumerations

enum  _err_codes

Functions

NTFSPATH_API BOOL has_NTFS_path_prefix (const TCHAR *path)
NTFSPATH_API BOOL is_UNC_path (const TCHAR *path)
NTFSPATH_API BOOL rem_UNC_path_prefix (const TCHAR *path, TCHAR *buff, size_t len)
NTFSPATH_API BOOL rem_NTFS_path_prefix (const TCHAR *path, TCHAR *buff, size_t len)
NTFSPATH_API BOOL add_NTFS_path_prefix (const TCHAR *path, TCHAR *buff, size_t len)
NTFSPATH_API const TCHAR * get_file_part (const TCHAR *path)
NTFSPATH_API const TCHAR * get_path_part (const TCHAR *path)
NTFSPATH_API const TCHAR * get_drive_part (const TCHAR *path)
NTFSPATH_API err_codes get_err_code ()
NTFSPATH_API const TCHAR * get_error_text (err_codes errc)
NTFSPATH_API BOOL is_absolute (const TCHAR *path)
NTFSPATH_API BOOL is_mask (const TCHAR *path)
NTFSPATH_API BOOL path_pop (const TCHAR *path, TCHAR *buff, size_t len)
NTFSPATH_API BOOL path_push (const TCHAR *path, const TCHAR *str, TCHAR *buff, size_t len)
NTFSPATH_API BOOL get_file_attr (const TCHAR *path, WIN32_FILE_ATTRIBUTE_DATA *attr)
NTFSPATH_API BOOL file_exist (const TCHAR *path, BOOL *ret)
NTFSPATH_API BOOL is_directory (const TCHAR *path, BOOL *ret)
NTFSPATH_API BOOL path_mask_cmp (const TCHAR *path, const TCHAR *mask)

Detailed Description

Intrface of NTFSpath library

Typedef Documentation

typedef enum _err_codes err_codes

Error codes


Enumeration Type Documentation

enum _err_codes

Error codes


Function Documentation

NTFSPATH_API BOOL add_NTFS_path_prefix ( const TCHAR *  path,
TCHAR *  buff,
size_t  len 
)

Add \?\ prefix to the input path if it is not exist

NTFSPATH_API BOOL file_exist ( const TCHAR *  path,
BOOL *  ret 
)

ret is TRUE when file is exist

NTFSPATH_API const TCHAR* get_drive_part ( const TCHAR *  path  ) 

Find a colon in the path. If a symbol before the colon is alpha it returns a pointer to the symbol in other cases it returns NULL

NTFSPATH_API err_codes get_err_code (  ) 

When an any function in the library returns FALSE it set an error code. You can get this error code by using of get_err_code() finction. You can get a description of an error code by using of get_error_text() finction.

NTFSPATH_API const TCHAR* get_error_text ( err_codes  errc  ) 

Gets a string with an error description by an error code

NTFSPATH_API BOOL get_file_attr ( const TCHAR *  path,
WIN32_FILE_ATTRIBUTE_DATA *  attr 
)

Get attributes of the file

NTFSPATH_API const TCHAR* get_file_part ( const TCHAR *  path  ) 

Returns a part of the input path after the last slash ('\' or '/') or NULL when no one slashes were not found.

NTFSPATH_API const TCHAR* get_path_part ( const TCHAR *  path  ) 

Returns a part of the input path after the first slash ('\' or '/') or NULL when no one slashes were not found. NTFS prefix (\?\) or UNC prefic ("\\?\UNC\") are ignored

NTFSPATH_API BOOL has_NTFS_path_prefix ( const TCHAR *  path  ) 

Returns TRUE when the path string begins from "\\?\" prefix

NTFSPATH_API BOOL is_absolute ( const TCHAR *  path  ) 

If the drive part is exist in the path it is absolute path

NTFSPATH_API BOOL is_directory ( const TCHAR *  path,
BOOL *  ret 
)

ret is true when file is exist and it is directory

NTFSPATH_API BOOL is_mask ( const TCHAR *  path  ) 

If the path string contains ? or * then this path is a mask

NTFSPATH_API BOOL is_UNC_path ( const TCHAR *  path  ) 

Returns TRUE when the path string begins from "\\?\UNC\" or "\\" prefixes

NTFSPATH_API BOOL path_mask_cmp ( const TCHAR *  path,
const TCHAR *  mask 
)

Implements an advanced comparison algorithm. It supports comparison of absolute and relative paths, masks in the path and some other.

NTFSPATH_API BOOL path_pop ( const TCHAR *  path,
TCHAR *  buff,
size_t  len 
)

Remove a part of the path after last slash. in case path and buff point to the same address a part of the path after last slash just removed without copying

NTFSPATH_API BOOL path_push ( const TCHAR *  path,
const TCHAR *  str,
TCHAR *  buff,
size_t  len 
)

Add a slash and the input string to the input path in case path and buff point to the same address a slash and the input string just added without copying

NTFSPATH_API BOOL rem_NTFS_path_prefix ( const TCHAR *  path,
TCHAR *  buff,
size_t  len 
)

Remove \?\ prefix from the input path

NTFSPATH_API BOOL rem_UNC_path_prefix ( const TCHAR *  path,
TCHAR *  buff,
size_t  len 
)

Remove \ or \?\ prefix from the input path


Generated on Sat Mar 24 21:17:39 2007 for NTFSpath by  doxygen 1.5.1-p1