2013-01-05 16 views

risposta

9

Quindi qui si va:


storageFile.getBasicPropertiesAsync().then(
    function (basicProperties) { 
     var size = basicProperties.size; 
    } 
); 
+0

felice di poter aiutare –

+0

capitale G su GetBasicPropertiesAsync per quello che vale. – ickydime

0

Hai provato questo:

 
     create_task(file->GetBasicPropertiesAsync()).then([this, file](BasicProperties^ basicProperties) 
     { 
      String^ dateModifiedString = dateFormat->Format(basicProperties->DateModified) + " " + timeFormat->Format(basicProperties->DateModified); 
      OutputTextBlock->Text += "\nFile size: " + basicProperties->Size.ToString() + " bytes" + "\nDate modified: " + dateModifiedString; 

     }); 

See: http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.fileproperties.basicproperties.size.aspx

+0

Ha bisogno della risposta in [tag: C#], non C++ –

+0

lol, puoi modificare la tua domanda e aggiungerla lì :) –

+0

:)) finalmente fatta! Sono così nuovo qui: D –

11

In C#:

StorageFile file = await openPicker.PickSingleFileAsync(); 
BasicProperties pro = await file.GetBasicPropertiesAsync(); 
if (pro.Size != 0){} 

È Shoul d utilizzando Windows.Storage.FileProperties per BasicProperties.