File indexing completed on 2025-01-18 09:53:44
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_WINAPI_DIRECTORY_MANAGEMENT_HPP_INCLUDED_
0010 #define BOOST_WINAPI_DIRECTORY_MANAGEMENT_HPP_INCLUDED_
0011
0012 #include <boost/winapi/basic_types.hpp>
0013 #include <boost/winapi/get_system_directory.hpp>
0014 #include <boost/winapi/detail/header.hpp>
0015
0016 #ifdef BOOST_HAS_PRAGMA_ONCE
0017 #pragma once
0018 #endif
0019
0020 #if !defined( BOOST_USE_WINDOWS_H )
0021 extern "C" {
0022 #if !defined( BOOST_NO_ANSI_APIS )
0023 BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
0024 CreateDirectoryA(boost::winapi::LPCSTR_, ::_SECURITY_ATTRIBUTES*);
0025 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
0026 BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
0027 GetTempPathA(boost::winapi::DWORD_ length, boost::winapi::LPSTR_ buffer);
0028 #endif
0029 BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
0030 RemoveDirectoryA(boost::winapi::LPCSTR_);
0031 #endif
0032 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
0033 CreateDirectoryW(boost::winapi::LPCWSTR_, ::_SECURITY_ATTRIBUTES*);
0034 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
0035 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
0036 GetTempPathW(boost::winapi::DWORD_ length, boost::winapi::LPWSTR_ buffer);
0037 #endif
0038 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
0039 RemoveDirectoryW(boost::winapi::LPCWSTR_);
0040 }
0041 #endif
0042
0043 namespace boost {
0044 namespace winapi {
0045
0046 #if !defined( BOOST_NO_ANSI_APIS )
0047 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
0048 using ::GetTempPathA;
0049 #endif
0050 using ::RemoveDirectoryA;
0051 #endif
0052 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
0053 using ::GetTempPathW;
0054 #endif
0055 using ::RemoveDirectoryW;
0056
0057 #if !defined( BOOST_NO_ANSI_APIS )
0058 BOOST_FORCEINLINE BOOL_ CreateDirectoryA(LPCSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
0059 {
0060 return ::CreateDirectoryA(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
0061 }
0062 #endif
0063
0064 BOOST_FORCEINLINE BOOL_ CreateDirectoryW(LPCWSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
0065 {
0066 return ::CreateDirectoryW(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
0067 }
0068
0069 #if !defined( BOOST_NO_ANSI_APIS )
0070 BOOST_FORCEINLINE BOOL_ create_directory(LPCSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
0071 {
0072 return ::CreateDirectoryA(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
0073 }
0074 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
0075 BOOST_FORCEINLINE DWORD_ get_temp_path(DWORD_ length, LPSTR_ buffer)
0076 {
0077 return ::GetTempPathA(length, buffer);
0078 }
0079 #endif
0080 BOOST_FORCEINLINE BOOL_ remove_directory(LPCSTR_ pPathName)
0081 {
0082 return ::RemoveDirectoryA(pPathName);
0083 }
0084 #endif
0085
0086 BOOST_FORCEINLINE BOOL_ create_directory(LPCWSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
0087 {
0088 return ::CreateDirectoryW(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
0089 }
0090 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
0091 BOOST_FORCEINLINE DWORD_ get_temp_path(DWORD_ length, LPWSTR_ buffer)
0092 {
0093 return ::GetTempPathW(length, buffer);
0094 }
0095 #endif
0096 BOOST_FORCEINLINE BOOL_ remove_directory(LPCWSTR_ pPathName)
0097 {
0098 return ::RemoveDirectoryW(pPathName);
0099 }
0100
0101 }
0102 }
0103
0104 #include <boost/winapi/detail/footer.hpp>
0105
0106 #endif