4#ifndef _Stroika_Foundation_IO_FileSystem_FileUtils_h_
5#define _Stroika_Foundation_IO_FileSystem_FileUtils_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
13#if qStroika_Foundation_Common_Platform_Windows
17#include "Stroika/Foundation/Characters/SDKChar.h"
18#include "Stroika/Foundation/Common/Common.h"
21#include "Stroika/Foundation/IO/AccessMode.h"
22#include "Stroika/Foundation/IO/FileSystem/Common.h"
36 void SetFileAccessWideOpened (
const filesystem::path& filePathName);
38#if qStroika_Foundation_Common_Platform_Windows
42 bool is_cygwin_symlink (
const filesystem::path& p);
47 filesystem::path read_cygwin_symlink (
const filesystem::path& p);
54 String
GetVolumeName (
const filesystem::path& driveLetterAbsPath);
56 vector<String> FindFiles (
const filesystem::path& path,
const String& fileNameToMatch = L
"*.*");
58 vector<String> FindFilesOneDirUnder (
const filesystem::path& path,
const String& fileNameToMatch = L
"*.*");
60 void CopyFile (
const filesystem::path& srcFile,
const filesystem::path& destPath);
63#if qStroika_Foundation_Common_Platform_Windows
64 class DirectoryChangeWatcher {
66 DirectoryChangeWatcher (
const DirectoryChangeWatcher&) =
delete;
67 void operator= (
const DirectoryChangeWatcher&) =
delete;
70 DirectoryChangeWatcher (
const filesystem::path& directoryName,
bool watchSubTree =
false, DWORD notifyFilter = FILE_NOTIFY_CHANGE_LAST_WRITE);
71 virtual ~DirectoryChangeWatcher ();
74 virtual void ValueChanged ();
77 static void ThreadProc (
void* lpParameter);
82 Execution::Thread::Ptr fThread;
90#if qStroika_Foundation_Common_Platform_Windows
91 struct AdjustSysErrorMode {
92 static UINT GetErrorMode ();
93 AdjustSysErrorMode (UINT newErrorMode);
94 ~AdjustSysErrorMode ();
106#include "FileUtils.inl"
String GetVolumeName(const filesystem::path &driveLetterAbsPath)