@@ -345,10 +345,14 @@ private ListedItem GetListedItemAsync(string itemPath, WIN32_FIND_DATA findData)
345
345
ListedItem listedItem = null ;
346
346
var isHidden = ( ( FileAttributes ) findData . dwFileAttributes & FileAttributes . Hidden ) == FileAttributes . Hidden ;
347
347
var isFolder = ( ( FileAttributes ) findData . dwFileAttributes & FileAttributes . Directory ) == FileAttributes . Directory ;
348
+ Win32PInvoke . FileTimeToSystemTime ( ref findData . ftLastWriteTime , out Win32PInvoke . SYSTEMTIME systemModifiedTimeOutput ) ;
349
+ Win32PInvoke . FileTimeToSystemTime ( ref findData . ftCreationTime , out Win32PInvoke . SYSTEMTIME systemCreatedTimeOutput ) ;
350
+
348
351
if ( ! isFolder )
349
352
{
350
353
string itemFileExtension = null ;
351
354
string itemType = null ;
355
+ long fileSize = Win32FindDataExtensions . GetSize ( findData ) ;
352
356
if ( findData . cFileName . Contains ( '.' , StringComparison . Ordinal ) )
353
357
{
354
358
itemFileExtension = Path . GetExtension ( itemPath ) ;
@@ -360,11 +364,15 @@ private ListedItem GetListedItemAsync(string itemPath, WIN32_FIND_DATA findData)
360
364
PrimaryItemAttribute = StorageItemTypes . File ,
361
365
ItemNameRaw = findData . cFileName ,
362
366
ItemPath = itemPath ,
367
+ ItemDateModifiedReal = systemModifiedTimeOutput . ToDateTime ( ) ,
368
+ ItemDateCreatedReal = systemCreatedTimeOutput . ToDateTime ( ) ,
363
369
IsHiddenItem = isHidden ,
364
370
LoadFileIcon = false ,
365
371
FileExtension = itemFileExtension ,
366
372
ItemType = itemType ,
367
- Opacity = isHidden ? Constants . UI . DimItemOpacity : 1
373
+ Opacity = isHidden ? Constants . UI . DimItemOpacity : 1 ,
374
+ FileSize = fileSize . ToSizeString ( ) ,
375
+ FileSizeBytes = fileSize ,
368
376
} ;
369
377
}
370
378
else
@@ -376,6 +384,8 @@ private ListedItem GetListedItemAsync(string itemPath, WIN32_FIND_DATA findData)
376
384
PrimaryItemAttribute = StorageItemTypes . Folder ,
377
385
ItemNameRaw = findData . cFileName ,
378
386
ItemPath = itemPath ,
387
+ ItemDateModifiedReal = systemModifiedTimeOutput . ToDateTime ( ) ,
388
+ ItemDateCreatedReal = systemCreatedTimeOutput . ToDateTime ( ) ,
379
389
IsHiddenItem = isHidden ,
380
390
LoadFileIcon = false ,
381
391
Opacity = isHidden ? Constants . UI . DimItemOpacity : 1
0 commit comments