Blame winpr/include/winpr/path.h

Packit Service fa4841
/**
Packit Service fa4841
 * WinPR: Windows Portable Runtime
Packit Service fa4841
 * Path Functions
Packit Service fa4841
 *
Packit Service fa4841
 * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
Packit Service fa4841
 *
Packit Service fa4841
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit Service fa4841
 * you may not use this file except in compliance with the License.
Packit Service fa4841
 * You may obtain a copy of the License at
Packit Service fa4841
 *
Packit Service fa4841
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit Service fa4841
 *
Packit Service fa4841
 * Unless required by applicable law or agreed to in writing, software
Packit Service fa4841
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit Service fa4841
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit Service fa4841
 * See the License for the specific language governing permissions and
Packit Service fa4841
 * limitations under the License.
Packit Service fa4841
 */
Packit Service fa4841
Packit Service fa4841
#ifndef WINPR_PATH_H
Packit Service fa4841
#define WINPR_PATH_H
Packit Service fa4841
Packit Service fa4841
#include <winpr/winpr.h>
Packit Service fa4841
#include <winpr/tchar.h>
Packit Service fa4841
#include <winpr/error.h>
Packit Service fa4841
#include <winpr/wtypes.h>
Packit Service fa4841
Packit Service fa4841
//#define HAVE_PATHCCH_H	1
Packit Service fa4841
Packit Service fa4841
#ifdef HAVE_PATHCCH_H
Packit Service fa4841
Packit Service fa4841
#include <Pathcch.h>
Packit Service fa4841
Packit Service fa4841
#else
Packit Service fa4841
Packit Service fa4841
#ifdef __cplusplus
Packit Service b1ea74
extern "C"
Packit Service b1ea74
{
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service b1ea74
#define PATHCCH_ALLOW_LONG_PATHS \
Packit Service b1ea74
	0x00000001 /* Allow building of \\?\ paths if longer than MAX_PATH */
Packit Service fa4841
Packit Service b1ea74
#define VOLUME_PREFIX _T("\\\\?\\Volume")
Packit Service b1ea74
#define VOLUME_PREFIX_LEN ((sizeof(VOLUME_PREFIX) / sizeof(TCHAR)) - 1)
Packit Service fa4841
Packit Service b1ea74
	/*
Packit Service b1ea74
	 * Maximum number of characters we support using the "\\?\" syntax
Packit Service b1ea74
	 * (0x7FFF + 1 for NULL terminator)
Packit Service b1ea74
	 */
Packit Service fa4841
Packit Service b1ea74
#define PATHCCH_MAX_CCH 0x8000
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddBackslashA(PSTR pszPath, size_t cchPath);
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddBackslashW(PWSTR pszPath, size_t cchPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchRemoveBackslashA(PSTR pszPath, size_t cchPath);
Packit Service b1ea74
	WINPR_API HRESULT PathCchRemoveBackslashW(PWSTR pszPath, size_t cchPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddBackslashExA(PSTR pszPath, size_t cchPath, PSTR* ppszEnd,
Packit Service b1ea74
	                                         size_t* pcchRemaining);
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddBackslashExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd,
Packit Service b1ea74
	                                         size_t* pcchRemaining);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchRemoveBackslashExA(PSTR pszPath, size_t cchPath, PSTR* ppszEnd,
Packit Service b1ea74
	                                            size_t* pcchRemaining);
Packit Service b1ea74
	WINPR_API HRESULT PathCchRemoveBackslashExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd,
Packit Service b1ea74
	                                            size_t* pcchRemaining);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddExtensionA(PSTR pszPath, size_t cchPath, PCSTR pszExt);
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchAppendA(PSTR pszPath, size_t cchPath, PCSTR pszMore);
Packit Service b1ea74
	WINPR_API HRESULT PathCchAppendW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchAppendExA(PSTR pszPath, size_t cchPath, PCSTR pszMore,
Packit Service b1ea74
	                                   unsigned long dwFlags);
Packit Service b1ea74
	WINPR_API HRESULT PathCchAppendExW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore,
Packit Service b1ea74
	                                   unsigned long dwFlags);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchCanonicalizeA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn);
Packit Service b1ea74
	WINPR_API HRESULT PathCchCanonicalizeW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchCanonicalizeExA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn,
Packit Service b1ea74
	                                         unsigned long dwFlags);
Packit Service b1ea74
	WINPR_API HRESULT PathCchCanonicalizeExW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn,
Packit Service b1ea74
	                                         unsigned long dwFlags);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathAllocCanonicalizeA(PCSTR pszPathIn, unsigned long dwFlags,
Packit Service b1ea74
	                                         PSTR* ppszPathOut);
Packit Service b1ea74
	WINPR_API HRESULT PathAllocCanonicalizeW(PCWSTR pszPathIn, unsigned long dwFlags,
Packit Service b1ea74
	                                         PWSTR* ppszPathOut);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchCombineA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn,
Packit Service b1ea74
	                                  PCSTR pszMore);
Packit Service b1ea74
	WINPR_API HRESULT PathCchCombineW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn,
Packit Service b1ea74
	                                  PCWSTR pszMore);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchCombineExA(PSTR pszPathOut, size_t cchPathOut, PCSTR pszPathIn,
Packit Service b1ea74
	                                    PCSTR pszMore, unsigned long dwFlags);
Packit Service b1ea74
	WINPR_API HRESULT PathCchCombineExW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn,
Packit Service b1ea74
	                                    PCWSTR pszMore, unsigned long dwFlags);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathAllocCombineA(PCSTR pszPathIn, PCSTR pszMore, unsigned long dwFlags,
Packit Service b1ea74
	                                    PSTR* ppszPathOut);
Packit Service b1ea74
	WINPR_API HRESULT PathAllocCombineW(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlags,
Packit Service b1ea74
	                                    PWSTR* ppszPathOut);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchFindExtensionA(PCSTR pszPath, size_t cchPath, PCSTR* ppszExt);
Packit Service b1ea74
	WINPR_API HRESULT PathCchFindExtensionW(PCWSTR pszPath, size_t cchPath, PCWSTR* ppszExt);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchRenameExtensionA(PSTR pszPath, size_t cchPath, PCSTR pszExt);
Packit Service b1ea74
	WINPR_API HRESULT PathCchRenameExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchRemoveExtensionA(PSTR pszPath, size_t cchPath);
Packit Service b1ea74
	WINPR_API HRESULT PathCchRemoveExtensionW(PWSTR pszPath, size_t cchPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API BOOL PathCchIsRootA(PCSTR pszPath);
Packit Service b1ea74
	WINPR_API BOOL PathCchIsRootW(PCWSTR pszPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API BOOL PathIsUNCExA(PCSTR pszPath, PCSTR* ppszServer);
Packit Service b1ea74
	WINPR_API BOOL PathIsUNCExW(PCWSTR pszPath, PCWSTR* ppszServer);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchSkipRootA(PCSTR pszPath, PCSTR* ppszRootEnd);
Packit Service b1ea74
	WINPR_API HRESULT PathCchSkipRootW(PCWSTR pszPath, PCWSTR* ppszRootEnd);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchStripToRootA(PSTR pszPath, size_t cchPath);
Packit Service b1ea74
	WINPR_API HRESULT PathCchStripToRootW(PWSTR pszPath, size_t cchPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchStripPrefixA(PSTR pszPath, size_t cchPath);
Packit Service b1ea74
	WINPR_API HRESULT PathCchStripPrefixW(PWSTR pszPath, size_t cchPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchRemoveFileSpecA(PSTR pszPath, size_t cchPath);
Packit Service b1ea74
	WINPR_API HRESULT PathCchRemoveFileSpecW(PWSTR pszPath, size_t cchPath);
Packit Service fa4841
Packit Service fa4841
#ifdef UNICODE
Packit Service b1ea74
#define PathCchAddBackslash PathCchAddBackslashW
Packit Service b1ea74
#define PathCchRemoveBackslash PathCchRemoveBackslashW
Packit Service b1ea74
#define PathCchAddBackslashEx PathCchAddBackslashExW
Packit Service b1ea74
#define PathCchRemoveBackslashEx PathCchRemoveBackslashExW
Packit Service b1ea74
#define PathCchAddExtension PathCchAddExtensionW
Packit Service b1ea74
#define PathCchAppend PathCchAppendW
Packit Service b1ea74
#define PathCchAppendEx PathCchAppendExW
Packit Service b1ea74
#define PathCchCanonicalize PathCchCanonicalizeW
Packit Service b1ea74
#define PathCchCanonicalizeEx PathCchCanonicalizeExW
Packit Service b1ea74
#define PathAllocCanonicalize PathAllocCanonicalizeW
Packit Service b1ea74
#define PathCchCombine PathCchCombineW
Packit Service b1ea74
#define PathCchCombineEx PathCchCombineExW
Packit Service b1ea74
#define PathAllocCombine PathAllocCombineW
Packit Service b1ea74
#define PathCchFindExtension PathCchFindExtensionW
Packit Service b1ea74
#define PathCchRenameExtension PathCchRenameExtensionW
Packit Service b1ea74
#define PathCchRemoveExtension PathCchRemoveExtensionW
Packit Service b1ea74
#define PathCchIsRoot PathCchIsRootW
Packit Service b1ea74
#define PathIsUNCEx PathIsUNCExW
Packit Service b1ea74
#define PathCchSkipRoot PathCchSkipRootW
Packit Service b1ea74
#define PathCchStripToRoot PathCchStripToRootW
Packit Service b1ea74
#define PathCchStripPrefix PathCchStripPrefixW
Packit Service b1ea74
#define PathCchRemoveFileSpec PathCchRemoveFileSpecW
Packit Service fa4841
#else
Packit Service b1ea74
#define PathCchAddBackslash PathCchAddBackslashA
Packit Service b1ea74
#define PathCchRemoveBackslash PathCchRemoveBackslashA
Packit Service b1ea74
#define PathCchAddBackslashEx PathCchAddBackslashExA
Packit Service b1ea74
#define PathCchRemoveBackslashEx PathCchRemoveBackslashExA
Packit Service b1ea74
#define PathCchAddExtension PathCchAddExtensionA
Packit Service b1ea74
#define PathCchAppend PathCchAppendA
Packit Service b1ea74
#define PathCchAppendEx PathCchAppendExA
Packit Service b1ea74
#define PathCchCanonicalize PathCchCanonicalizeA
Packit Service b1ea74
#define PathCchCanonicalizeEx PathCchCanonicalizeExA
Packit Service b1ea74
#define PathAllocCanonicalize PathAllocCanonicalizeA
Packit Service b1ea74
#define PathCchCombine PathCchCombineA
Packit Service b1ea74
#define PathCchCombineEx PathCchCombineExA
Packit Service b1ea74
#define PathAllocCombine PathAllocCombineA
Packit Service b1ea74
#define PathCchFindExtension PathCchFindExtensionA
Packit Service b1ea74
#define PathCchRenameExtension PathCchRenameExtensionA
Packit Service b1ea74
#define PathCchRemoveExtension PathCchRemoveExtensionA
Packit Service b1ea74
#define PathCchIsRoot PathCchIsRootA
Packit Service b1ea74
#define PathIsUNCEx PathIsUNCExA
Packit Service b1ea74
#define PathCchSkipRoot PathCchSkipRootA
Packit Service b1ea74
#define PathCchStripToRoot PathCchStripToRootA
Packit Service b1ea74
#define PathCchStripPrefix PathCchStripPrefixA
Packit Service b1ea74
#define PathCchRemoveFileSpec PathCchRemoveFileSpecA
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service b1ea74
	/* Unix-style Paths */
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddSlashA(PSTR pszPath, size_t cchPath);
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddSlashW(PWSTR pszPath, size_t cchPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddSlashExA(PSTR pszPath, size_t cchPath, PSTR* ppszEnd,
Packit Service b1ea74
	                                     size_t* pcchRemaining);
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddSlashExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd,
Packit Service b1ea74
	                                     size_t* pcchRemaining);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT UnixPathCchAddExtensionA(PSTR pszPath, size_t cchPath, PCSTR pszExt);
Packit Service b1ea74
	WINPR_API HRESULT UnixPathCchAddExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT UnixPathCchAppendA(PSTR pszPath, size_t cchPath, PCSTR pszMore);
Packit Service b1ea74
	WINPR_API HRESULT UnixPathCchAppendW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT UnixPathAllocCombineA(PCSTR pszPathIn, PCSTR pszMore, unsigned long dwFlags,
Packit Service b1ea74
	                                        PSTR* ppszPathOut);
Packit Service b1ea74
	WINPR_API HRESULT UnixPathAllocCombineW(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlags,
Packit Service b1ea74
	                                        PWSTR* ppszPathOut);
Packit Service fa4841
Packit Service fa4841
#ifdef UNICODE
Packit Service b1ea74
#define PathCchAddSlash PathCchAddSlashW
Packit Service b1ea74
#define PathCchAddSlashEx PathCchAddSlashExW
Packit Service b1ea74
#define UnixPathCchAddExtension UnixPathCchAddExtensionW
Packit Service b1ea74
#define UnixPathCchAppend UnixPathCchAppendW
Packit Service b1ea74
#define UnixPathAllocCombine UnixPathAllocCombineW
Packit Service fa4841
#else
Packit Service b1ea74
#define PathCchAddSlash PathCchAddSlashA
Packit Service b1ea74
#define PathCchAddSlashEx PathCchAddSlashExA
Packit Service b1ea74
#define UnixPathCchAddExtension UnixPathCchAddExtensionA
Packit Service b1ea74
#define UnixPathCchAppend UnixPathCchAppendA
Packit Service b1ea74
#define UnixPathAllocCombine UnixPathAllocCombineA
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service b1ea74
	/* Native-style Paths */
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddSeparatorA(PSTR pszPath, size_t cchPath);
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddSeparatorW(PWSTR pszPath, size_t cchPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddSeparatorExA(PSTR pszPath, size_t cchPath, PSTR* ppszEnd,
Packit Service b1ea74
	                                         size_t* pcchRemaining);
Packit Service b1ea74
	WINPR_API HRESULT PathCchAddSeparatorExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd,
Packit Service b1ea74
	                                         size_t* pcchRemaining);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT NativePathCchAddExtensionA(PSTR pszPath, size_t cchPath, PCSTR pszExt);
Packit Service b1ea74
	WINPR_API HRESULT NativePathCchAddExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT NativePathCchAppendA(PSTR pszPath, size_t cchPath, PCSTR pszMore);
Packit Service b1ea74
	WINPR_API HRESULT NativePathCchAppendW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT NativePathAllocCombineA(PCSTR pszPathIn, PCSTR pszMore, unsigned long dwFlags,
Packit Service b1ea74
	                                          PSTR* ppszPathOut);
Packit Service b1ea74
	WINPR_API HRESULT NativePathAllocCombineW(PCWSTR pszPathIn, PCWSTR pszMore,
Packit Service b1ea74
	                                          unsigned long dwFlags, PWSTR* ppszPathOut);
Packit Service fa4841
Packit Service fa4841
#ifdef UNICODE
Packit Service b1ea74
#define PathCchAddSeparator PathCchAddSeparatorW
Packit Service b1ea74
#define PathCchAddSeparatorEx PathCchAddSeparatorExW
Packit Service b1ea74
#define NativePathCchAddExtension NativePathCchAddExtensionW
Packit Service b1ea74
#define NativePathCchAppend NativePathCchAppendW
Packit Service b1ea74
#define NativePathAllocCombine NativePathAllocCombineW
Packit Service fa4841
#else
Packit Service b1ea74
#define PathCchAddSeparator PathCchAddSeparatorA
Packit Service b1ea74
#define PathCchAddSeparatorEx PathCchAddSeparatorExA
Packit Service b1ea74
#define NativePathCchAddExtension NativePathCchAddExtensionA
Packit Service b1ea74
#define NativePathCchAppend NativePathCchAppendA
Packit Service b1ea74
#define NativePathAllocCombine NativePathAllocCombineA
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service b1ea74
	/* Path Portability Functions */
Packit Service fa4841
Packit Service b1ea74
#define PATH_STYLE_WINDOWS 0x00000001
Packit Service b1ea74
#define PATH_STYLE_UNIX 0x00000002
Packit Service b1ea74
#define PATH_STYLE_NATIVE 0x00000003
Packit Service fa4841
Packit Service b1ea74
#define PATH_SHARED_LIB_EXT_WITH_DOT 0x00000001
Packit Service b1ea74
#define PATH_SHARED_LIB_EXT_APPLE_SO 0x00000002
Packit Service b1ea74
#define PATH_SHARED_LIB_EXT_EXPLICIT 0x80000000
Packit Service b1ea74
#define PATH_SHARED_LIB_EXT_EXPLICIT_DLL 0x80000001
Packit Service b1ea74
#define PATH_SHARED_LIB_EXT_EXPLICIT_SO 0x80000002
Packit Service b1ea74
#define PATH_SHARED_LIB_EXT_EXPLICIT_DYLIB 0x80000003
Packit Service fa4841
Packit Service b1ea74
	WINPR_API HRESULT PathCchConvertStyleA(PSTR pszPath, size_t cchPath, unsigned long dwFlags);
Packit Service b1ea74
	WINPR_API HRESULT PathCchConvertStyleW(PWSTR pszPath, size_t cchPath, unsigned long dwFlags);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API char PathGetSeparatorA(unsigned long dwFlags);
Packit Service b1ea74
	WINPR_API WCHAR PathGetSeparatorW(unsigned long dwFlags);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API PCSTR PathGetSharedLibraryExtensionA(unsigned long dwFlags);
Packit Service b1ea74
	WINPR_API PCWSTR PathGetSharedLibraryExtensionW(unsigned long dwFlags);
Packit Service fa4841
Packit Service fa4841
#ifdef UNICODE
Packit Service b1ea74
#define PathCchConvertStyle PathCchConvertStyleW
Packit Service b1ea74
#define PathGetSeparator PathGetSeparatorW
Packit Service b1ea74
#define PathGetSharedLibraryExtension PathGetSharedLibraryExtensionW
Packit Service fa4841
#else
Packit Service b1ea74
#define PathCchConvertStyle PathCchConvertStyleA
Packit Service b1ea74
#define PathGetSeparator PathGetSeparatorW
Packit Service b1ea74
#define PathGetSharedLibraryExtension PathGetSharedLibraryExtensionA
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service fa4841
#ifdef __cplusplus
Packit Service fa4841
}
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service fa4841
/**
Packit Service fa4841
 * Shell Path Functions
Packit Service fa4841
 */
Packit Service fa4841
Packit Service b1ea74
#define KNOWN_PATH_HOME 1
Packit Service b1ea74
#define KNOWN_PATH_TEMP 2
Packit Service b1ea74
#define KNOWN_PATH_XDG_DATA_HOME 3
Packit Service b1ea74
#define KNOWN_PATH_XDG_CONFIG_HOME 4
Packit Service b1ea74
#define KNOWN_PATH_XDG_CACHE_HOME 5
Packit Service b1ea74
#define KNOWN_PATH_XDG_RUNTIME_DIR 6
Packit Service fa4841
Packit Service fa4841
#ifdef __cplusplus
Packit Service b1ea74
extern "C"
Packit Service b1ea74
{
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service b1ea74
	WINPR_API char* GetKnownPath(int id);
Packit Service b1ea74
	WINPR_API char* GetKnownSubPath(int id, const char* path);
Packit Service b1ea74
	WINPR_API char* GetEnvironmentPath(char* name);
Packit Service b1ea74
	WINPR_API char* GetEnvironmentSubPath(char* name, const char* path);
Packit Service b1ea74
	WINPR_API char* GetCombinedPath(const char* basePath, const char* subPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes);
Packit Service fa4841
Packit Service fa4841
#if !defined(_WIN32) || defined(_UWP)
Packit Service fa4841
Packit Service b1ea74
	WINPR_API BOOL PathIsRelativeA(LPCSTR pszPath);
Packit Service b1ea74
	WINPR_API BOOL PathIsRelativeW(LPCWSTR pszPath);
Packit Service b1ea74
Packit Service b1ea74
	WINPR_API BOOL PathFileExistsA(LPCSTR pszPath);
Packit Service b1ea74
	WINPR_API BOOL PathFileExistsW(LPCWSTR pszPath);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API BOOL PathIsDirectoryEmptyA(LPCSTR pszPath);
Packit Service b1ea74
	WINPR_API BOOL PathIsDirectoryEmptyW(LPCWSTR pszPath);
Packit Service fa4841
Packit Service fa4841
#ifdef UNICODE
Packit Service b1ea74
#define PathFileExists PathFileExistsW
Packit Service b1ea74
#define PathIsDirectoryEmpty PathIsDirectoryEmptyW
Packit Service fa4841
#else
Packit Service b1ea74
#define PathFileExists PathFileExistsA
Packit Service b1ea74
#define PathIsDirectoryEmpty PathIsDirectoryEmptyA
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service fa4841
#ifdef __cplusplus
Packit Service fa4841
}
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service fa4841
#ifdef _WIN32
Packit Service b1ea74
#include <shlwapi.h>
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service fa4841
#endif /* WINPR_PATH_H */