Windows 8 アプリを使用して unc ディレクトリからローカル ディレクトリにファイルをコピーしたことのある人はいますか?
UNCパスに接続可能
std FILE ACCESS サンプルを使用しており、コードの 1 行を次のように変更しました。すべての機能を追加しました。ファイル タイプとして .txt を追加しました。
しかし、アクセス拒否エラーが発生し続けます。
誰かが私に実際の例を提供してくれる可能性がありますか?
ティア
private async void Initialize()
{
try
{
//sampleFile = await Windows.Storage.KnownFolders.DocumentsLibrary.GetFileAsync(filename);
string myfile = @"\\ALL387\Temp\testfile.txt";
sampleFile = await Windows.Storage.StorageFile.GetFileFromPathAsync(myfile);
}
catch (FileNotFoundException)
{
// sample file doesn't exist so scenario one must be run
}
catch (Exception e)
{
var fred = e.Message;
}
}