Uri.LocalPath プロパティとは?

辞典・百科事典の検索サービス - Weblio辞書

初めての方へ

参加元一覧


用語解説|全文検索

.NET Framework クラス ライブラリ リファレンス

日本マイクロソフト株式会社日本マイクロソフト株式会社

Uri.LocalPath プロパティ

ローカル オペレーティング システムでのファイル名表現取得します。

名前空間: System
アセンブリ: System (system.dll 内)
構文構文

例外例外
例外種類条件

InvalidOperationException

このインスタンス相対 URI を表します。このプロパティは、絶対 URI でのみ有効です。

解説解説

このプロパティからの戻り値は、エスケープ解除されます。パスWindows ファイル パスとして認識される場合すべてのスラッシュ (/) が円記号 (\) に置換されます。

URI file://computer/file.ext については、/file.ext絶対パスで、 \\computer\file.extローカル パスです。

使用例使用

Uri インスタンス作成し、ローカル パスコンソール出力する例を次に示します。

    Dim uriAddress2 As New Uri("file://server/filename.ext")
    Console.WriteLine(uriAddress2.LocalPath)
    Console.WriteLine("Uri {0} a UNC path", IIf(uriAddress2.IsUnc,
 "is", "is not"))
 'TODO: For performance reasons this should be changed to nested IF statements
    Console.WriteLine("Uri {0} a local host", IIf(uriAddress2.IsLoopback,
 "is", "is not"))
 'TODO: For performance reasons this should be changed to nested IF statements
    Console.WriteLine("Uri {0} a file", IIf(uriAddress2.IsFile,
 "is", "is not"))
 'TODO: For performance reasons this should be changed to nested IF statements

End Sub 'GetParts
Uri uriAddress2 =  new Uri("file://server/filename.ext");
Console.WriteLine(uriAddress2.LocalPath);
Console.WriteLine("Uri {0} a UNC path", uriAddress2.IsUnc ? "is"
 : "is not");
Console.WriteLine("Uri {0} a local host", uriAddress2.IsLoopback ? "is"
 : "is not");
Console.WriteLine("Uri {0} a file", uriAddress2.IsFile ? "is"
 : "is not");
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照





Uri.LocalPath プロパティのページへのリンク
Uri.LocalPath プロパティのお隣キーワード
モバイル
モバイル版のWeblioは、下記のURLからアクセスしてください。
http://m.weblio.jp/
_ _   


Uri.LocalPath プロパティのページの著作権
Weblio 辞書情報提供元は参加元一覧にて確認できます。

  
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2012 Microsoft.All rights reserved.

©2012 Weblio RSS