File.Open的默认目录是什么? [英] What is default directory of File.Open?

查看:99
本文介绍了File.Open的默认目录是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有此代码:

Stream f = File.Open("data.majid", FileMode.OpenOrCreate, FileAccess.ReadWrite);

将在哪里创建文件?

推荐答案

来自 File.Open MSDN文档:

From the File.Open MSDN documentation:

path 参数允许指定相对或绝对路径信息.相对路径信息被解释为相对于当前工作目录.要获取当前的工作目录,请参见 GetCurrentDirectory

The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see GetCurrentDirectory.

这篇关于File.Open的默认目录是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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