ClickHouse/base/poco/Foundation/include/Poco/File_WIN32.h
Robert Schulze b79ead9c84
Move poco to base/poco/ (#46075)
* Replicate poco into base/poco/

* De-register poco submodule

* Build poco from ClickHouse

* Exclude poco from stylecheck

* Exclude poco from whitespace check

* Exclude poco from typo check

* Remove x bit from sources/headers (the style check complained)

* Exclude poco from duplicate include check

* Fix fasttest

* Remove contrib/poco-cmake/*

* Simplify poco build descriptions

* Remove poco stuff not used by ClickHouse

* Glob poco sources

* Exclude poco from clang-tidy
2023-02-08 12:04:11 +01:00

88 lines
1.9 KiB
C++

//
// File_WIN32.h
//
// Library: Foundation
// Package: Filesystem
// Module: File
//
// Definition of the FileImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_File_WIN32_INCLUDED
#define Foundation_File_WIN32_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/Timestamp.h"
namespace Poco {
class Foundation_API FileImpl
{
protected:
typedef UInt64 FileSizeImpl;
FileImpl();
FileImpl(const std::string& path);
virtual ~FileImpl();
void swapImpl(FileImpl& file);
void setPathImpl(const std::string& path);
const std::string& getPathImpl() const;
bool existsImpl() const;
bool canReadImpl() const;
bool canWriteImpl() const;
bool canExecuteImpl() const;
bool isFileImpl() const;
bool isDirectoryImpl() const;
bool isLinkImpl() const;
bool isDeviceImpl() const;
bool isHiddenImpl() const;
Timestamp createdImpl() const;
Timestamp getLastModifiedImpl() const;
void setLastModifiedImpl(const Timestamp& ts);
FileSizeImpl getSizeImpl() const;
void setSizeImpl(FileSizeImpl size);
void setWriteableImpl(bool flag = true);
void setExecutableImpl(bool flag = true);
void copyToImpl(const std::string& path) const;
void renameToImpl(const std::string& path);
void linkToImpl(const std::string& path, int type) const;
void removeImpl();
bool createFileImpl();
bool createDirectoryImpl();
FileSizeImpl totalSpaceImpl() const;
FileSizeImpl usableSpaceImpl() const;
FileSizeImpl freeSpaceImpl() const;
static void handleLastErrorImpl(const std::string& path);
private:
std::string _path;
friend class FileHandle;
friend class DirectoryIteratorImpl;
friend class WindowsDirectoryWatcherStrategy;
};
//
// inlines
//
inline const std::string& FileImpl::getPathImpl() const
{
return _path;
}
} // namespace Poco
#endif // Foundation_File_WIN32_INCLUDED