否]目录"或QUOT;文件"在System.IO [英] No "Directory" or "File" in System.IO

查看:118
本文介绍了否]目录"或QUOT;文件"在System.IO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用新的VS2012和Windows 8,并创建C#Metro风格的项目。我想在目录中的文件列表,但字符串Directory.GetFiles(路径)援引一个错误说它不会在目前的情况下存在。但我使用System.IO。 唯一有用的东西我在System.IO是路径 - 没有目录或文件有。问题出在哪里?

I've just started to use new VS2012 and Windows 8 and create C# Metro-style project. I want to get list of files in directory, but string "Directory.GetFiles(path)" invoke an error saying it doesn't exist in current context. But I use System.IO. The only useful thing I have in System.IO is "Path" - no "Directory" or "File" there. Where is the problem?

推荐答案

Windows 8的Metro风格的应用程序不支持的文件系统。

Windows 8 Metro-Style apps do not support the filesystem.

相反,使用新地铁的API

这篇关于否]目录"或QUOT;文件"在System.IO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆