| 721 | } |
| 722 | |
| 723 | HANDLE FTPClientWrapperSSH::OpenFile(const TCHAR* file, bool write) { |
| 724 | HANDLE hFile = INVALID_HANDLE_VALUE; |
| 725 | |
| 726 | DWORD access; |
| 727 | DWORD share; |
| 728 | DWORD creation; |
| 729 | |
| 730 | if (write) { |
| 731 | access = GENERIC_WRITE; |
| 732 | share = FILE_SHARE_READ; |
| 733 | creation = CREATE_ALWAYS; |
| 734 | int res = PU::CreateLocalDirFile(file); |
| 735 | if (res == -1) |
| 736 | return hFile; |
| 737 | } else { |
| 738 | access = GENERIC_READ; |
| 739 | share = FILE_SHARE_READ; |
| 740 | creation = OPEN_EXISTING; |
| 741 | } |
| 742 | |
| 743 | |
| 744 | hFile = ::CreateFile(file, access, share, NULL, creation, 0, NULL); |
| 745 | |
| 746 | return hFile; |
| 747 | } |
| 748 | |
| 749 | FILETIME FTPClientWrapperSSH::ConvertFiletime(uint32_t nTime, uint32_t /*nNanosecs*/) { |
| 750 | FILETIME ft{}; |
nothing calls this directly
no outgoing calls
no test coverage detected