在Windows手机上列出文件

时间:2013-04-22 14:27:16

标签: c# windows-phone-7

我想列出手机上的所有文件。

我的解决方案中有两个文件。一个数据库文件和一个pdf文件。

使用此代码我只会列出数据库文件。如何使用IsolatedStorage列出PDF文件?

            using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
            {
                string searchPattern = "\\" + "*";
                string[] fileNames = store.GetFileNames(searchPattern);
            }

1 个答案:

答案 0 :(得分:0)

pdf文件不存储在隔离存储中,而是存储在xap中您无法枚举xap中的文件。

为了能够列出PDF,您需要先将其复制到隔离存储。 (例如,您的应用首次运行)

相关问题