|
20 | 20 | using Windows.Storage.FileProperties; |
21 | 21 | using Windows.Storage.Search; |
22 | 22 | using static Files.App.Helpers.Win32PInvoke; |
23 | | -using static Files.App.Helpers.NativeFindStorageItemHelper; |
| 23 | +using static Files.App.Helpers.Win32Helper; |
24 | 24 | using DispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue; |
25 | 25 | using FileAttributes = System.IO.FileAttributes; |
26 | 26 |
|
@@ -680,7 +680,7 @@ void ClearDisplay() |
680 | 680 | DirectoryInfoUpdated?.Invoke(this, EventArgs.Empty); |
681 | 681 | } |
682 | 682 |
|
683 | | - if (NativeWinApiHelper.IsHasThreadAccessPropertyPresent && dispatcherQueue.HasThreadAccess) |
| 683 | + if (Win32Helper.IsHasThreadAccessPropertyPresent && dispatcherQueue.HasThreadAccess) |
684 | 684 | ClearDisplay(); |
685 | 685 | else |
686 | 686 | await dispatcherQueue.EnqueueOrInvokeAsync(ClearDisplay); |
@@ -768,7 +768,7 @@ void OrderEntries() |
768 | 768 | folderSettings.SortDirectoriesAlongsideFiles, folderSettings.SortFilesFirst)); |
769 | 769 | } |
770 | 770 |
|
771 | | - if (NativeWinApiHelper.IsHasThreadAccessPropertyPresent && dispatcherQueue.HasThreadAccess) |
| 771 | + if (Win32Helper.IsHasThreadAccessPropertyPresent && dispatcherQueue.HasThreadAccess) |
772 | 772 | return Task.Run(OrderEntries); |
773 | 773 |
|
774 | 774 | OrderEntries(); |
@@ -1865,8 +1865,8 @@ await dispatcherQueue.EnqueueOrInvokeAsync(() => |
1865 | 1865 | private void WatchForDirectoryChanges(string path, CloudDriveSyncStatus syncStatus) |
1866 | 1866 | { |
1867 | 1867 | Debug.WriteLine($"WatchForDirectoryChanges: {path}"); |
1868 | | - var hWatchDir = NativeFileOperationsHelper.CreateFileFromApp(path, 1, 1 | 2 | 4, |
1869 | | - IntPtr.Zero, 3, (uint)NativeFileOperationsHelper.File_Attributes.BackupSemantics | (uint)NativeFileOperationsHelper.File_Attributes.Overlapped, IntPtr.Zero); |
| 1868 | + var hWatchDir = Win32PInvoke.CreateFileFromApp(path, 1, 1 | 2 | 4, |
| 1869 | + IntPtr.Zero, 3, (uint)Win32PInvoke.File_Attributes.BackupSemantics | (uint)Win32PInvoke.File_Attributes.Overlapped, IntPtr.Zero); |
1870 | 1870 | if (hWatchDir.ToInt64() == -1) |
1871 | 1871 | return; |
1872 | 1872 |
|
@@ -1974,13 +1974,13 @@ private void WatchForDirectoryChanges(string path, CloudDriveSyncStatus syncStat |
1974 | 1974 |
|
1975 | 1975 | private void WatchForGitChanges() |
1976 | 1976 | { |
1977 | | - var hWatchDir = NativeFileOperationsHelper.CreateFileFromApp( |
| 1977 | + var hWatchDir = Win32PInvoke.CreateFileFromApp( |
1978 | 1978 | GitDirectory!, |
1979 | 1979 | 1, |
1980 | 1980 | 1 | 2 | 4, |
1981 | 1981 | IntPtr.Zero, |
1982 | 1982 | 3, |
1983 | | - (uint)NativeFileOperationsHelper.File_Attributes.BackupSemantics | (uint)NativeFileOperationsHelper.File_Attributes.Overlapped, |
| 1983 | + (uint)Win32PInvoke.File_Attributes.BackupSemantics | (uint)Win32PInvoke.File_Attributes.Overlapped, |
1984 | 1984 | IntPtr.Zero); |
1985 | 1985 |
|
1986 | 1986 | if (hWatchDir.ToInt64() == -1) |
@@ -2226,7 +2226,7 @@ private async Task AddFileOrFolderAsync(ListedItem? item) |
2226 | 2226 | if (UserSettingsService.FoldersSettingsService.AreAlternateStreamsVisible) |
2227 | 2227 | { |
2228 | 2228 | // New file added, enumerate ADS |
2229 | | - foreach (var ads in NativeFileOperationsHelper.GetAlternateStreams(item.ItemPath)) |
| 2229 | + foreach (var ads in Win32Helper.GetAlternateStreams(item.ItemPath)) |
2230 | 2230 | { |
2231 | 2231 | var adsItem = Win32StorageEnumerator.GetAlternateStream(ads, item); |
2232 | 2232 | filesAndFolders.Add(adsItem); |
|
0 commit comments