MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / OpenFile

Method OpenFile

src/FTPClientWrapperSSH.cpp:723–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

721}
722
723HANDLE 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
749FILETIME FTPClientWrapperSSH::ConvertFiletime(uint32_t nTime, uint32_t /*nNanosecs*/) {
750 FILETIME ft{};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected