[英]Delete file in Windows Store app
How to delete Database file created by Sqlite-net in Windows store application. 如何在Windows应用商店中删除由Sqlite-net创建的数据库文件。 I tried this
我试过了
StorageFile sampleFile = await ApplicationData.Current.LocalFolder.GetFileAsync(databaseName);
sampleFile.DeleteAsync(StorageDeleteOption.Default);
but neither getting any exception nor file is getting deleted. 但不会出现任何异常,也不会删除文件。 What am i missing here ?
我在这里想念什么?
Try awaiting the DeleteAsync
as well 也尝试等待
DeleteAsync
StorageFile sampleFile = await ApplicationData.Current.LocalFolder.GetFileAsync(databaseName);
await sampleFile.DeleteAsync(StorageDeleteOption.Default);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.