本文介绍了在Silverlight中使用IsolatedStorage创建文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友,我在asp.net应用程序中使用Silverlight.
我正在尝试使用IsolatedStorageFile在本地硬盘驱动器"D"中创建一个文件夹.
当我仅给出目录名称但不知道它存在的位置时,它正在创建目录.
而且,当我给出完整的路径"D:/Manish/ManishNewFolder"时,它将引发错误无法创建目录.
Hello Friends I''m using Silverlight in my asp.net application.
I''m trying to create a folder in my local hard drive "D" using IsolatedStorageFile.
It is creating the directory when I give only Directory Name but I''m not getting where it exists.
And, when I give complete path "D:/Manish/ManishNewFolder" then it is raising an error Unable to create a directory.
string fileName = "D:/ManishNewFolder";
var store = IsolatedStorageFile.GetUserStoreForApplication();
if (!store.DirectoryExists(fileName))
{
store.CreateDirectory(fileName);
}
var isoStream = store.OpenFile(fileName + @"/myvoice.wav", FileMode.OpenOrCreate);
isoStream.Close();
store.Dispose();
请指导我.我想在本地驱动器"D"中创建驱动器.
谢谢
Please guide me. I want to make a drive in my local drive "D".
Thanks
推荐答案
这篇关于在Silverlight中使用IsolatedStorage创建文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!