更改独立存储位置

问题描述 投票:0回答:2

有没有办法更改IsolatedStorage 文件的位置?我正在使用 .NET 3.5sp1,并用 C# 编写我的应用程序

我想将其位置更改为

D:\TempDir

c# isolatedstorage
2个回答
3
投票

我不相信这是不。我认为操作系统+用户取决于文件最终的确切位置。

如果您可以开始将文件粘贴到任何地方,那么它就不会非常孤立,并且会有点破坏应用程序本地存储的意义。


0
投票

否,但您可以通过在访问存储时提供名为isolatedStorageScope的参数来将独立存储更改为不同的预定义位置:

C#

IsolatedStorageFile.GetStore(IsolatedStorageScope.User)

用户范围:%LOCALAPPDATA%\IsolatedStorage
用户漫游范围:%APPDATA%\IsolatedStorage
机器范围:%PROGRAMDATA%\IsolatedStorage\

更多信息或文档或旧版窗口

© www.soinside.com 2019 - 2024. All rights reserved.