[PowerRename] Using File Date Time Attributes Feature (#4722)

* Add basic using file attributes functionality

* Correctly return result

* Refactor

* Move retrieving date attribute to get function

* Cover various milliseconds patterns, retrieve file attributes only when needed

* Correctly check if date/time pattern is used. Remove wstring cast

* Use correct flags on CreateFile call to handle directories

* rebase to master

* Perform transform operation at last to make it not mess with date/time variables

* Refactor, remove extra space
This commit is contained in:
Mehmet Murat Akburak
2020-07-16 14:24:49 +03:00
committed by GitHub
parent ebe70a52d1
commit a8153dd8db
6 changed files with 135 additions and 14 deletions

View File

@@ -5,6 +5,7 @@
HRESULT GetTrimmedFileName(_Out_ PWSTR result, UINT cchMax, _In_ PCWSTR source);
HRESULT GetTransformedFileName(_Out_ PWSTR result, UINT cchMax, _In_ PCWSTR source, DWORD flags);
HRESULT GetDatedFileName(_Out_ PWSTR result, UINT cchMax, _In_ PCWSTR source, SYSTEMTIME LocalTime);
HRESULT EnumerateDataObject(_In_ IUnknown* pdo, _In_ IPowerRenameManager* psrm);
BOOL GetEnumeratedFileName(
__out_ecount(cchMax) PWSTR pszUniqueName,
@@ -12,4 +13,4 @@ BOOL GetEnumeratedFileName(
__in PCWSTR pszTemplate,
__in_opt PCWSTR pszDir,
unsigned long ulMinLong,
__inout unsigned long* pulNumUsed);
__inout unsigned long* pulNumUsed);