列出Windows手机上的文件

本文关键字:文件 手机 Windows 列出 | 更新日期: 2023-09-27 18:10:16

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

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

使用此代码,我只获得列出的数据库文件。我如何列出PDF文件与IsolatedStorage?

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

列出Windows手机上的文件

pdf文件不是存储在隔离存储中,而是存储在xap中。

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