Files
core/ASCOfficePPTXFile/File.cpp
Sergey.Konovalov 27c5e5de52 turn off stdafx.h, define из него перенесены в настройки проекта.
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58333 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 23:14:34 +03:00

29 lines
681 B
C++

//#include "stdafx.h"
#include "File.h"
namespace FileSystem {
bool File::Exists(LPCTSTR path) {
WIN32_FIND_DATA findData;
ZeroMemory(&findData, sizeof(findData));
HANDLE handle = ::FindFirstFile(path, &findData);
bool fileExists = true;
if (handle == INVALID_HANDLE_VALUE)
fileExists = false;
FindClose(handle);
return fileExists;
}
bool File::Exists(const String& path) {
return Exists(path.c_str());
}
void File::Create(LPCTSTR path) {
CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
}
void File::Create(const String& path) {
Create(path.c_str());
}
}