FreeRDP
path.c File Reference
#include <winpr/config.h>
#include <winpr/crt.h>
#include <winpr/tchar.h>
#include <winpr/path.h>
#include <winpr/file.h>
#include "../log.h"
#include "include/PathCchAddSeparator.h"
#include "include/PathCchAddSeparatorEx.h"
#include "include/PathCchAddExtension.h"
#include "include/PathCchAppend.h"
#include "include/PathAllocCombine.h"

Macros

#define PATH_SLASH_CHR   '/'
 
#define PATH_SLASH_STR   "/"
 
#define PATH_BACKSLASH_CHR   '\\'
 
#define PATH_BACKSLASH_STR   "\\"
 
#define PATH_SLASH_STR_W
 
#define PATH_BACKSLASH_STR_W
 
#define PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define PATH_SEPARATOR_STR   PATH_SLASH_STR
 
#define PATH_SEPARATOR_STR_W   PATH_SLASH_STR_W
 
#define SHARED_LIBRARY_EXT_DLL   "dll"
 
#define SHARED_LIBRARY_EXT_SO   "so"
 
#define SHARED_LIBRARY_EXT_DYLIB   "dylib"
 
#define SHARED_LIBRARY_EXT   SHARED_LIBRARY_EXT_SO
 
#define TAG   WINPR_TAG("path")
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define PATH_CCH_ADD_SEPARATOR   PathCchAddBackslashA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define PATH_CCH_ADD_SEPARATOR   PathCchAddBackslashW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define PATH_CCH_ADD_SEPARATOR   PathCchAddSlashA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define PATH_CCH_ADD_SEPARATOR   PathCchAddSlashW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define PATH_CCH_ADD_SEPARATOR   PathCchAddSeparatorA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define PATH_CCH_ADD_SEPARATOR   PathCchAddSeparatorW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddBackslashExA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddBackslashExW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddSlashExA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddSlashExW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddSeparatorExA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddSeparatorExW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define PATH_CCH_ADD_EXTENSION   PathCchAddExtensionA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define PATH_CCH_ADD_EXTENSION   PathCchAddExtensionW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define PATH_CCH_ADD_EXTENSION   UnixPathCchAddExtensionA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define PATH_CCH_ADD_EXTENSION   UnixPathCchAddExtensionW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define PATH_CCH_ADD_EXTENSION   NativePathCchAddExtensionA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define PATH_CCH_ADD_EXTENSION   NativePathCchAddExtensionW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_BACKSLASH_STR
 
#define PATH_CCH_APPEND   PathCchAppendA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_BACKSLASH_STR_W
 
#define PATH_CCH_APPEND   PathCchAppendW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_SLASH_STR
 
#define PATH_CCH_APPEND   UnixPathCchAppendA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_SLASH_STR_W
 
#define PATH_CCH_APPEND   UnixPathCchAppendW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_SEPARATOR_STR
 
#define PATH_CCH_APPEND   NativePathCchAppendA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_SEPARATOR_STR_W
 
#define PATH_CCH_APPEND   NativePathCchAppendW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_BACKSLASH_STR
 
#define PATH_ALLOC_COMBINE   PathAllocCombineA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_BACKSLASH_STR_W
 
#define PATH_ALLOC_COMBINE   PathAllocCombineW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_SLASH_STR
 
#define PATH_ALLOC_COMBINE   UnixPathAllocCombineA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_SLASH_STR_W
 
#define PATH_ALLOC_COMBINE   UnixPathAllocCombineW
 
#define DEFINE_UNICODE   FALSE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_SEPARATOR_STR
 
#define PATH_ALLOC_COMBINE   NativePathAllocCombineA
 
#define DEFINE_UNICODE   TRUE
 
#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR
 
#define CUR_PATH_SEPARATOR_STR   PATH_SEPARATOR_STR_W
 
#define PATH_ALLOC_COMBINE   NativePathAllocCombineW
 

Functions

HRESULT PathCchRemoveBackslashA (PSTR pszPath, size_t cchPath)
 
HRESULT PathCchRemoveBackslashW (PWSTR pszPath, size_t cchPath)
 
HRESULT PathCchRemoveBackslashExA (PSTR pszPath, size_t cchPath, PSTR *ppszEnd, size_t *pcchRemaining)
 
HRESULT PathCchRemoveBackslashExW (PWSTR pszPath, size_t cchPath, PWSTR *ppszEnd, size_t *pcchRemaining)
 
HRESULT PathCchAppendExA (PSTR pszPath, size_t cchPath, PCSTR pszMore, unsigned long dwFlags)
 
HRESULT PathCchAppendExW (PWSTR pszPath, size_t cchPath, PCWSTR pszMore, unsigned long dwFlags)
 
HRESULT PathCchCanonicalizeA (PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn)
 
HRESULT PathCchCanonicalizeW (PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn)
 
HRESULT PathCchCanonicalizeExA (PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn, unsigned long dwFlags)
 
HRESULT PathCchCanonicalizeExW (PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, unsigned long dwFlags)
 
HRESULT PathAllocCanonicalizeA (PCSTR pszPathIn, unsigned long dwFlags, PSTR *ppszPathOut)
 
HRESULT PathAllocCanonicalizeW (PCWSTR pszPathIn, unsigned long dwFlags, PWSTR *ppszPathOut)
 
HRESULT PathCchCombineA (PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn, PCSTR pszMore)
 
HRESULT PathCchCombineW (PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, PCWSTR pszMore)
 
HRESULT PathCchCombineExA (PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn, PCSTR pszMore, unsigned long dwFlags)
 
HRESULT PathCchCombineExW (PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlags)
 
HRESULT PathCchFindExtensionA (PCSTR pszPath, size_t cchPath, PCSTR *ppszExt)
 
HRESULT PathCchFindExtensionW (PCWSTR pszPath, size_t cchPath, PCWSTR *ppszExt)
 
HRESULT PathCchRenameExtensionA (PSTR pszPath, size_t cchPath, PCSTR pszExt)
 
HRESULT PathCchRenameExtensionW (PWSTR pszPath, size_t cchPath, PCWSTR pszExt)
 
HRESULT PathCchRemoveExtensionA (PSTR pszPath, size_t cchPath)
 
HRESULT PathCchRemoveExtensionW (PWSTR pszPath, size_t cchPath)
 
BOOL PathCchIsRootA (PCSTR pszPath)
 
BOOL PathCchIsRootW (PCWSTR pszPath)
 
BOOL PathIsUNCExA (PCSTR pszPath, PCSTR *ppszServer)
 
BOOL PathIsUNCExW (PCWSTR pszPath, PCWSTR *ppszServer)
 
HRESULT PathCchSkipRootA (PCSTR pszPath, PCSTR *ppszRootEnd)
 
HRESULT PathCchSkipRootW (PCWSTR pszPath, PCWSTR *ppszRootEnd)
 
HRESULT PathCchStripToRootA (PSTR pszPath, size_t cchPath)
 
HRESULT PathCchStripToRootW (PWSTR pszPath, size_t cchPath)
 
HRESULT PathCchStripPrefixA (PSTR pszPath, size_t cchPath)
 
HRESULT PathCchStripPrefixW (PWSTR pszPath, size_t cchPath)
 
HRESULT PathCchRemoveFileSpecA (PSTR pszPath, size_t cchPath)
 
HRESULT PathCchRemoveFileSpecW (PWSTR pszPath, size_t cchPath)
 
HRESULT PathCchConvertStyleA (PSTR pszPath, size_t cchPath, unsigned long dwFlags)
 
HRESULT PathCchConvertStyleW (PWSTR pszPath, size_t cchPath, unsigned long dwFlags)
 
char PathGetSeparatorA (unsigned long dwFlags)
 
WCHAR PathGetSeparatorW (unsigned long dwFlags)
 
PCSTR PathGetSharedLibraryExtensionA (unsigned long dwFlags)
 
PCWSTR PathGetSharedLibraryExtensionW (unsigned long dwFlags)
 
const char * GetKnownPathIdString (int id)
 
static WCHAR * concat (const WCHAR *path, size_t pathlen, const WCHAR *name, size_t namelen)
 
BOOL winpr_RemoveDirectory_RecursiveA (LPCSTR lpPathName)
 
BOOL winpr_RemoveDirectory_RecursiveW (LPCWSTR lpPathName)
 

Variables

static const CHAR SharedLibraryExtensionDllA [] = "dll"
 
static const CHAR SharedLibraryExtensionSoA [] = "so"
 
static const CHAR SharedLibraryExtensionDylibA [] = "dylib"
 
static const CHAR SharedLibraryExtensionDotDllA [] = ".dll"
 
static const CHAR SharedLibraryExtensionDotSoA [] = ".so"
 
static const CHAR SharedLibraryExtensionDotDylibA [] = ".dylib"
 

Macro Definition Documentation

◆ CUR_PATH_SEPARATOR_CHR [1/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [2/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [3/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [4/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [5/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_CHR [6/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_CHR [7/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [8/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [9/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [10/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [11/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_CHR [12/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_CHR [13/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [14/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [15/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [16/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [17/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_CHR [18/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_CHR [19/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [20/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [21/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [22/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [23/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_CHR [24/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_CHR [25/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [26/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_BACKSLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [27/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [28/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ CUR_PATH_SEPARATOR_CHR [29/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_CHR [30/30]

#define CUR_PATH_SEPARATOR_CHR   PATH_SEPARATOR_CHR

◆ CUR_PATH_SEPARATOR_STR [1/12]

#define CUR_PATH_SEPARATOR_STR   PATH_BACKSLASH_STR

◆ CUR_PATH_SEPARATOR_STR [2/12]

#define CUR_PATH_SEPARATOR_STR   PATH_BACKSLASH_STR_W

◆ CUR_PATH_SEPARATOR_STR [3/12]

#define CUR_PATH_SEPARATOR_STR   PATH_SLASH_STR

◆ CUR_PATH_SEPARATOR_STR [4/12]

#define CUR_PATH_SEPARATOR_STR   PATH_SLASH_STR_W

◆ CUR_PATH_SEPARATOR_STR [5/12]

#define CUR_PATH_SEPARATOR_STR   PATH_SEPARATOR_STR

◆ CUR_PATH_SEPARATOR_STR [6/12]

#define CUR_PATH_SEPARATOR_STR   PATH_SEPARATOR_STR_W

◆ CUR_PATH_SEPARATOR_STR [7/12]

#define CUR_PATH_SEPARATOR_STR   PATH_BACKSLASH_STR

◆ CUR_PATH_SEPARATOR_STR [8/12]

#define CUR_PATH_SEPARATOR_STR   PATH_BACKSLASH_STR_W

◆ CUR_PATH_SEPARATOR_STR [9/12]

#define CUR_PATH_SEPARATOR_STR   PATH_SLASH_STR

◆ CUR_PATH_SEPARATOR_STR [10/12]

#define CUR_PATH_SEPARATOR_STR   PATH_SLASH_STR_W

◆ CUR_PATH_SEPARATOR_STR [11/12]

#define CUR_PATH_SEPARATOR_STR   PATH_SEPARATOR_STR

◆ CUR_PATH_SEPARATOR_STR [12/12]

#define CUR_PATH_SEPARATOR_STR   PATH_SEPARATOR_STR_W

◆ DEFINE_UNICODE [1/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [2/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [3/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [4/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [5/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [6/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [7/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [8/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [9/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [10/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [11/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [12/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [13/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [14/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [15/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [16/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [17/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [18/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [19/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [20/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [21/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [22/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [23/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [24/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [25/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [26/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [27/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [28/30]

#define DEFINE_UNICODE   TRUE

◆ DEFINE_UNICODE [29/30]

#define DEFINE_UNICODE   FALSE

◆ DEFINE_UNICODE [30/30]

#define DEFINE_UNICODE   TRUE

◆ PATH_ALLOC_COMBINE [1/6]

#define PATH_ALLOC_COMBINE   PathAllocCombineA

◆ PATH_ALLOC_COMBINE [2/6]

#define PATH_ALLOC_COMBINE   PathAllocCombineW

◆ PATH_ALLOC_COMBINE [3/6]

#define PATH_ALLOC_COMBINE   UnixPathAllocCombineA

◆ PATH_ALLOC_COMBINE [4/6]

#define PATH_ALLOC_COMBINE   UnixPathAllocCombineW

◆ PATH_ALLOC_COMBINE [5/6]

#define PATH_ALLOC_COMBINE   NativePathAllocCombineA

◆ PATH_ALLOC_COMBINE [6/6]

#define PATH_ALLOC_COMBINE   NativePathAllocCombineW

◆ PATH_BACKSLASH_CHR

#define PATH_BACKSLASH_CHR   '\\'

◆ PATH_BACKSLASH_STR

#define PATH_BACKSLASH_STR   "\\"

◆ PATH_BACKSLASH_STR_W

#define PATH_BACKSLASH_STR_W
Value:
{ \
'\\', '\0' \
}

◆ PATH_CCH_ADD_EXTENSION [1/6]

#define PATH_CCH_ADD_EXTENSION   PathCchAddExtensionA

◆ PATH_CCH_ADD_EXTENSION [2/6]

#define PATH_CCH_ADD_EXTENSION   PathCchAddExtensionW

◆ PATH_CCH_ADD_EXTENSION [3/6]

#define PATH_CCH_ADD_EXTENSION   UnixPathCchAddExtensionA

◆ PATH_CCH_ADD_EXTENSION [4/6]

#define PATH_CCH_ADD_EXTENSION   UnixPathCchAddExtensionW

◆ PATH_CCH_ADD_EXTENSION [5/6]

#define PATH_CCH_ADD_EXTENSION   NativePathCchAddExtensionA

◆ PATH_CCH_ADD_EXTENSION [6/6]

#define PATH_CCH_ADD_EXTENSION   NativePathCchAddExtensionW

◆ PATH_CCH_ADD_SEPARATOR [1/6]

#define PATH_CCH_ADD_SEPARATOR   PathCchAddBackslashA

◆ PATH_CCH_ADD_SEPARATOR [2/6]

#define PATH_CCH_ADD_SEPARATOR   PathCchAddBackslashW

◆ PATH_CCH_ADD_SEPARATOR [3/6]

#define PATH_CCH_ADD_SEPARATOR   PathCchAddSlashA

◆ PATH_CCH_ADD_SEPARATOR [4/6]

#define PATH_CCH_ADD_SEPARATOR   PathCchAddSlashW

◆ PATH_CCH_ADD_SEPARATOR [5/6]

#define PATH_CCH_ADD_SEPARATOR   PathCchAddSeparatorA

◆ PATH_CCH_ADD_SEPARATOR [6/6]

#define PATH_CCH_ADD_SEPARATOR   PathCchAddSeparatorW

◆ PATH_CCH_ADD_SEPARATOR_EX [1/6]

#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddBackslashExA

◆ PATH_CCH_ADD_SEPARATOR_EX [2/6]

#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddBackslashExW

◆ PATH_CCH_ADD_SEPARATOR_EX [3/6]

#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddSlashExA

◆ PATH_CCH_ADD_SEPARATOR_EX [4/6]

#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddSlashExW

◆ PATH_CCH_ADD_SEPARATOR_EX [5/6]

#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddSeparatorExA

◆ PATH_CCH_ADD_SEPARATOR_EX [6/6]

#define PATH_CCH_ADD_SEPARATOR_EX   PathCchAddSeparatorExW

◆ PATH_CCH_APPEND [1/6]

#define PATH_CCH_APPEND   PathCchAppendA

◆ PATH_CCH_APPEND [2/6]

#define PATH_CCH_APPEND   PathCchAppendW

◆ PATH_CCH_APPEND [3/6]

#define PATH_CCH_APPEND   UnixPathCchAppendA

◆ PATH_CCH_APPEND [4/6]

#define PATH_CCH_APPEND   UnixPathCchAppendW

◆ PATH_CCH_APPEND [5/6]

#define PATH_CCH_APPEND   NativePathCchAppendA

◆ PATH_CCH_APPEND [6/6]

#define PATH_CCH_APPEND   NativePathCchAppendW

◆ PATH_SEPARATOR_CHR

#define PATH_SEPARATOR_CHR   PATH_SLASH_CHR

◆ PATH_SEPARATOR_STR

#define PATH_SEPARATOR_STR   PATH_SLASH_STR

◆ PATH_SEPARATOR_STR_W

#define PATH_SEPARATOR_STR_W   PATH_SLASH_STR_W

◆ PATH_SLASH_CHR

#define PATH_SLASH_CHR   '/'

WinPR: Windows Portable Runtime Path Functions

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

◆ PATH_SLASH_STR

#define PATH_SLASH_STR   "/"

◆ PATH_SLASH_STR_W

#define PATH_SLASH_STR_W
Value:
{ \
'/', '\0' \
}

◆ SHARED_LIBRARY_EXT

#define SHARED_LIBRARY_EXT   SHARED_LIBRARY_EXT_SO

◆ SHARED_LIBRARY_EXT_DLL

#define SHARED_LIBRARY_EXT_DLL   "dll"

◆ SHARED_LIBRARY_EXT_DYLIB

#define SHARED_LIBRARY_EXT_DYLIB   "dylib"

◆ SHARED_LIBRARY_EXT_SO

#define SHARED_LIBRARY_EXT_SO   "so"

◆ TAG

#define TAG   WINPR_TAG("path")

Function Documentation

◆ concat()

static WCHAR* concat ( const WCHAR *  path,
size_t  pathlen,
const WCHAR *  name,
size_t  namelen 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetKnownPathIdString()

const char* GetKnownPathIdString ( int  id)
Here is the caller graph for this function:

◆ PathAllocCanonicalizeA()

HRESULT PathAllocCanonicalizeA ( PCSTR  pszPathIn,
unsigned long  dwFlags,
PSTR *  ppszPathOut 
)

◆ PathAllocCanonicalizeW()

HRESULT PathAllocCanonicalizeW ( PCWSTR  pszPathIn,
unsigned long  dwFlags,
PWSTR *  ppszPathOut 
)

◆ PathCchAppendExA()

HRESULT PathCchAppendExA ( PSTR  pszPath,
size_t  cchPath,
PCSTR  pszMore,
unsigned long  dwFlags 
)

◆ PathCchAppendExW()

HRESULT PathCchAppendExW ( PWSTR  pszPath,
size_t  cchPath,
PCWSTR  pszMore,
unsigned long  dwFlags 
)

◆ PathCchCanonicalizeA()

HRESULT PathCchCanonicalizeA ( PSTR  pszPathOut,
size_t  cchPathOut,
PCSTR  pszPathIn 
)

◆ PathCchCanonicalizeExA()

HRESULT PathCchCanonicalizeExA ( PSTR  pszPathOut,
size_t  cchPathOut,
PCSTR  pszPathIn,
unsigned long  dwFlags 
)

◆ PathCchCanonicalizeExW()

HRESULT PathCchCanonicalizeExW ( PWSTR  pszPathOut,
size_t  cchPathOut,
PCWSTR  pszPathIn,
unsigned long  dwFlags 
)

◆ PathCchCanonicalizeW()

HRESULT PathCchCanonicalizeW ( PWSTR  pszPathOut,
size_t  cchPathOut,
PCWSTR  pszPathIn 
)

◆ PathCchCombineA()

HRESULT PathCchCombineA ( PSTR  pszPathOut,
size_t  cchPathOut,
PCSTR  pszPathIn,
PCSTR  pszMore 
)

◆ PathCchCombineExA()

HRESULT PathCchCombineExA ( PSTR  pszPathOut,
size_t  cchPathOut,
PCSTR  pszPathIn,
PCSTR  pszMore,
unsigned long  dwFlags 
)

◆ PathCchCombineExW()

HRESULT PathCchCombineExW ( PWSTR  pszPathOut,
size_t  cchPathOut,
PCWSTR  pszPathIn,
PCWSTR  pszMore,
unsigned long  dwFlags 
)

◆ PathCchCombineW()

HRESULT PathCchCombineW ( PWSTR  pszPathOut,
size_t  cchPathOut,
PCWSTR  pszPathIn,
PCWSTR  pszMore 
)

◆ PathCchConvertStyleA()

HRESULT PathCchConvertStyleA ( PSTR  pszPath,
size_t  cchPath,
unsigned long  dwFlags 
)

PathCchConvertStyle

Here is the caller graph for this function:

◆ PathCchConvertStyleW()

HRESULT PathCchConvertStyleW ( PWSTR  pszPath,
size_t  cchPath,
unsigned long  dwFlags 
)
Here is the caller graph for this function:

◆ PathCchFindExtensionA()

HRESULT PathCchFindExtensionA ( PCSTR  pszPath,
size_t  cchPath,
PCSTR *  ppszExt 
)

PathCchFindExtension

Here is the caller graph for this function:

◆ PathCchFindExtensionW()

HRESULT PathCchFindExtensionW ( PCWSTR  pszPath,
size_t  cchPath,
PCWSTR *  ppszExt 
)

◆ PathCchIsRootA()

BOOL PathCchIsRootA ( PCSTR  pszPath)

PathCchIsRoot

◆ PathCchIsRootW()

BOOL PathCchIsRootW ( PCWSTR  pszPath)

◆ PathCchRemoveBackslashA()

HRESULT PathCchRemoveBackslashA ( PSTR  pszPath,
size_t  cchPath 
)

◆ PathCchRemoveBackslashExA()

HRESULT PathCchRemoveBackslashExA ( PSTR  pszPath,
size_t  cchPath,
PSTR *  ppszEnd,
size_t *  pcchRemaining 
)

◆ PathCchRemoveBackslashExW()

HRESULT PathCchRemoveBackslashExW ( PWSTR  pszPath,
size_t  cchPath,
PWSTR *  ppszEnd,
size_t *  pcchRemaining 
)

◆ PathCchRemoveBackslashW()

HRESULT PathCchRemoveBackslashW ( PWSTR  pszPath,
size_t  cchPath 
)

◆ PathCchRemoveExtensionA()

HRESULT PathCchRemoveExtensionA ( PSTR  pszPath,
size_t  cchPath 
)

PathCchRemoveExtension

◆ PathCchRemoveExtensionW()

HRESULT PathCchRemoveExtensionW ( PWSTR  pszPath,
size_t  cchPath 
)

◆ PathCchRemoveFileSpecA()

HRESULT PathCchRemoveFileSpecA ( PSTR  pszPath,
size_t  cchPath 
)

PathCchRemoveFileSpec

◆ PathCchRemoveFileSpecW()

HRESULT PathCchRemoveFileSpecW ( PWSTR  pszPath,
size_t  cchPath 
)

◆ PathCchRenameExtensionA()

HRESULT PathCchRenameExtensionA ( PSTR  pszPath,
size_t  cchPath,
PCSTR  pszExt 
)

PathCchRenameExtension

◆ PathCchRenameExtensionW()

HRESULT PathCchRenameExtensionW ( PWSTR  pszPath,
size_t  cchPath,
PCWSTR  pszExt 
)

◆ PathCchSkipRootA()

HRESULT PathCchSkipRootA ( PCSTR  pszPath,
PCSTR *  ppszRootEnd 
)

PathCchSkipRoot

◆ PathCchSkipRootW()

HRESULT PathCchSkipRootW ( PCWSTR  pszPath,
PCWSTR *  ppszRootEnd 
)

◆ PathCchStripPrefixA()

HRESULT PathCchStripPrefixA ( PSTR  pszPath,
size_t  cchPath 
)

PathCchStripPrefix

Here is the call graph for this function:

◆ PathCchStripPrefixW()

HRESULT PathCchStripPrefixW ( PWSTR  pszPath,
size_t  cchPath 
)
Here is the call graph for this function:

◆ PathCchStripToRootA()

HRESULT PathCchStripToRootA ( PSTR  pszPath,
size_t  cchPath 
)

PathCchStripToRoot

◆ PathCchStripToRootW()

HRESULT PathCchStripToRootW ( PWSTR  pszPath,
size_t  cchPath 
)

◆ PathGetSeparatorA()

char PathGetSeparatorA ( unsigned long  dwFlags)

PathGetSeparator

Here is the caller graph for this function:

◆ PathGetSeparatorW()

WCHAR PathGetSeparatorW ( unsigned long  dwFlags)
Here is the caller graph for this function:

◆ PathGetSharedLibraryExtensionA()

PCSTR PathGetSharedLibraryExtensionA ( unsigned long  dwFlags)
Here is the caller graph for this function:

◆ PathGetSharedLibraryExtensionW()

PCWSTR PathGetSharedLibraryExtensionW ( unsigned long  dwFlags)
Here is the call graph for this function:

◆ PathIsUNCExA()

BOOL PathIsUNCExA ( PCSTR  pszPath,
PCSTR *  ppszServer 
)

PathIsUNCEx

◆ PathIsUNCExW()

BOOL PathIsUNCExW ( PCWSTR  pszPath,
PCWSTR *  ppszServer 
)

◆ winpr_RemoveDirectory_RecursiveA()

BOOL winpr_RemoveDirectory_RecursiveA ( LPCSTR  lpPathName)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_RemoveDirectory_RecursiveW()

BOOL winpr_RemoveDirectory_RecursiveW ( LPCWSTR  lpPathName)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ SharedLibraryExtensionDllA

const CHAR SharedLibraryExtensionDllA[] = "dll"
static

PathGetSharedLibraryExtension

◆ SharedLibraryExtensionDotDllA

const CHAR SharedLibraryExtensionDotDllA[] = ".dll"
static

◆ SharedLibraryExtensionDotDylibA

const CHAR SharedLibraryExtensionDotDylibA[] = ".dylib"
static

◆ SharedLibraryExtensionDotSoA

const CHAR SharedLibraryExtensionDotSoA[] = ".so"
static

◆ SharedLibraryExtensionDylibA

const CHAR SharedLibraryExtensionDylibA[] = "dylib"
static

◆ SharedLibraryExtensionSoA

const CHAR SharedLibraryExtensionSoA[] = "so"
static