path
「path」の意味
「path」は、主に二つの意味を持つ単語である。一つ目は、人や動物が通るための狭い道や通路を指す。例えば、森や公園内にある歩行者用の小道などが該当する。二つ目は、抽象的な意味での進むべき道筋や方向性を示す。これは、人生の選択肢やキャリアプランなど、物理的な道ではなく、概念的な道を意味する。「path」の発音・読み方
「path」の発音は、IPA表記で /pæθ/ となる。IPAのカタカナ読みでは「パス」となり、日本人が発音するカタカナ英語では「パス」と読む。この単語は発音によって意味や品詞が変わるものではない。「path」の定義を英語で解説
英語での「path」の定義は次の通りである。"A narrow way for walking, especially one through the countryside or a park" は、歩行者用の狭い道、特に田舎や公園を通る道を指す。また、"A course of action or way of achieving a specified result" は、特定の結果を達成するための行動や方法を意味する。「path」の類語
「path」の類語には、次のようなものがある。"trail" は、主に自然の中にある歩行者用の道を指す。"lane" は、狭い道や通路を意味し、"alley" は、建物の間にある狭い通路を指す。また、"route" や "course" は、抽象的な意味での道筋や方向性を示す言葉として使われることがある。「path」に関連する用語・表現
「path」に関連する用語や表現には、"footpath" や "pathway" などがある。"footpath" は、歩行者専用の道を意味し、"pathway" は、広い意味での道や通路を指す。「path」の例文
1. The narrow path led us through the woods.(狭い道が私たちを森を通して導いた。)2. She chose a different career path.(彼女は異なるキャリアパスを選んだ。)
3. The garden has a winding path.(その庭には曲がりくねった道がある。)
4. They followed the path of least resistance.(彼らは最も抵抗の少ない道をたどった。)
5. The path was covered with fallen leaves.(道は落ち葉で覆われていた。)
6. The company is on the path to success.(その会社は成功への道を歩んでいる。)
7. A stone path connected the two buildings.(石の道が二つの建物をつないでいた。)
8. He decided to follow his own path in life.(彼は人生で自分の道を進むことを決めた。)
9. The path led to a small pond.(その道は小さな池に続いていた。)
10. She is on the right path to achieve her goals.(彼女は目標を達成するための正しい道を進んでいる。)
Path
Pathとは、Path, Inc.が運営しているSNS(ソーシャルネットワーキングサービス)の名称である。2010年11月にスタートした。
Pathは、少数の知人や家族とのコミュニケーションに特化したクローズドなSNSであるという点に大きな特徴がある。フレンドとして登録可能なユーザー数は、最大50名に限定されている。現実世界で親密な関係の家族・友人とのプライベートなコミュニケーションを行うSNSとして注目されている。
参照リンク
Path
Path クラス
アセンブリ: mscorlib (mscorlib.dll 内)


.NET Framework では、"\\.\PHYSICALDRIVE0" など、デバイス名を指定したパスを使用して物理ディスクに直接アクセスすることはできません。
パスとは、ファイルまたはディレクトリの位置を示す文字列です。パスは、必ずしもディスク上の位置をポイントせず、たとえば、メモリやデバイスの位置を示す場合もあります。パスの正しい書式は、現在のプラットフォームで決定されます。たとえば、システムによっては、パスをドライブ名やボリューム名で始める場合がありますが、この要素は他のシステムには存在しません。また、システムによっては、パスに、ファイルに格納された情報のタイプを示す拡張子を含めることができます。ファイル名の拡張子の書式は、プラットフォームに依存します。たとえば、拡張子を 3 文字に制限しているシステムもありますが、制限しないシステムもあります。現在のプラットフォームは、パスの要素を区切る文字セット、およびパスの指定時に使用できない文字セットも決定します。これらの違いがあるため、Path クラスのいくつかのメンバの厳密な動作と Path クラスのフィールドは、プラットフォームに依存します。
パスには、絶対位置情報または相対位置情報を含めることができます。絶対パスは、完全な位置を指定します。つまり、ファイルまたはディレクトリは、現在の位置に関係なく一意に識別できます。相対パスは、部分的な位置を指定します。つまり、現在の位置は、相対パスで指定したファイルを検索するときの開始点として使用されます。現在のディレクトリを確認するには、Directory.GetCurrentDirectory を呼び出します。
Path クラスのほとんどのメンバは、ファイル システムと対話せず、パス文字列で指定したファイルの有無を検査しません。ChangeExtension などのパス文字列を修正する Path クラス メンバは、ファイル システムのファイル名には影響を与えません。ただし、Path メンバは、指定したパス文字列の内容を検証し、文字列に、InvalidPathChars で定義されるパス文字列で無効な文字が含まれている場合は、ArgumentException をスローします。たとえば、Windows ベースのデスクトップ プラットフォームでは、引用符 (")、不等号 (より小) (<)、不等号 (より大) (>)、パイプ (|)、バックスペース (\b)、null (\0)、Unicode 文字の 16 ~ 18 および 20 ~ 25 が無効なパス文字です。
Path クラスのメンバを使用すると、ファイル名の拡張子がパスの一部かどうかの判断や、2 つの文字列を 1 つのパス名に結合するなどの一般的な操作をすばやく、簡単に実行できます。
Path クラスのすべてのメンバは静的であるため、パスのインスタンスを持たなくても呼び出すことができます。
![]() |
---|
入力文字列としてパスを受け入れるメンバでは、そのパスが正しい書式である必要があります。それ以外の場合は、例外が発生します。たとえば、パスが絶対パスであっても空白で始まっている場合、そのパスはクラスのメソッドではトリムされません。このため、パスが正しい書式にならず、例外が発生します。同様に、1 つのパスまたは複数のパスの組み合わせを絶対パスとして 2 度指定することはできません。たとえば、"c:\temp c:\windows" でも、ほとんどの場合において例外が発生します。パス文字列を受け入れるメソッドを使用するときは、パスが適切な書式であることを確認します。 |
パスを受け入れるメンバでは、ファイルまたはディレクトリを参照するパスを指定できます。指定するパスは、相対パス、またはサーバーおよび共有名を示す UNC (Universal Naming Convention) パスにすることができます。たとえば、次に示すパスはすべて有効なパスです。
-
C# では "c:\\MyDir\\MyFile.txt"、Visual Basic では "c:\MyDir\MyFile.txt"。
-
C# では "c:\\MyDir"、Visual Basic では "c:\MyDir"。
-
C# では "MyDir\\MySubdir"、Visual Basic では "MyDir\MySubDir"。
-
C# では "\\\\MyServer\\MyShare"、Visual Basic では "\\MyServer\MyShare"。
これらの操作はすべて文字列で実行されるため、実行結果がすべてのシナリオで有効かどうかを確認できません。たとえば、GetExtension メソッドは、それに渡す文字列を解析し、その文字列から拡張子を返します。ただし、その拡張子を持つファイルがディスク上に存在するとは限りません。
このクラスの使用例については、以下の「使用例」を参照してください。その他の一般的な I/O タスクまたは関連する I/O タスクの例を次の表に示します。
GetExtension | |
GetFullPath | |
GetFileName | |
GetFileNameWithoutExtension | |
GetDirectoryName | |
ChangeExtension | |

Imports System Imports System.IO Public Class Test Public Shared Sub Main() Dim path1 As String = "c:\temp\MyTest.txt" Dim path2 As String = "c:\temp\MyTest" Dim path3 As String = "temp" If Path.HasExtension(path1) Then Console.WriteLine("{0} has an extension.", path1) End If If Path.HasExtension(path2) = False Then Console.WriteLine("{0} has no extension.", path2) End If If Path.IsPathRooted(path3) = False Then Console.WriteLine("The string {0} contains no root information.", path3) End If Console.WriteLine("The full path of {0} is {1}.", path3, Path.GetFullPath(path3)) Console.WriteLine("{0} is the location for temporary files.", Path.GetTempPath()) Console.WriteLine("{0} is a file available for use.", Path.GetTempFileName()) ' This code produces output similar to the following: ' c:\temp\MyTest.txt has an extension. ' c:\temp\MyTest has no extension. ' The string temp contains no root information. ' The full path of temp is D:\Documents and Settings\cliffc\My Documents\Visual Studio 2005\Projects\ConsoleApplication2\ConsoleApplication2\bin\Debug\temp. ' D:\Documents and Settings\cliffc\Local Settings\Temp\8\ is the location for temporary files. ' D:\Documents and Settings\cliffc\Local Settings\Temp\8\tmp3D.tmp is a file available for use. End Sub End Class
using System; using System.IO; class Test { public static void Main() { string path1 = @"c:\temp\MyTest.txt"; string path2 = @"c:\temp\MyTest"; string path3 = @"temp"; if (Path.HasExtension(path1)) { Console.WriteLine("{0} has an extension.", path1); } if (!Path.HasExtension(path2)) { Console.WriteLine("{0} has no extension.", path2); } if (!Path.IsPathRooted(path3)) { Console.WriteLine("The string {0} contains no root information.", path3); } Console.WriteLine("The full path of {0} is {1}.", path3, Path.GetFullPath(path3)); Console.WriteLine("{0} is the location for temporary files.", Path.GetTempPath()); Console.WriteLine("{0} is a file available for use.", Path.GetTempFileName()); /* This code produces output similar to the following: * c:\temp\MyTest.txt has an extension. * c:\temp\MyTest has no extension. * The string temp contains no root information. * The full path of temp is D:\Documents and Settings\cliffc\My Documents\Visual Studio 2005\Projects\ConsoleApplication2\ConsoleApplication2\bin\Debug\temp. * D:\Documents and Settings\cliffc\Local Settings\Temp\8\ is the location for temporary files. * D:\Documents and Settings\cliffc\Local Settings\Temp\8\tmp3D.tmp is a file available for use. */ } }
using namespace System; using namespace System::IO; int main() { String^ path1 = "c:\\temp\\MyTest.txt"; String^ path2 = "c:\\temp\\MyTest"; String^ path3 = "temp"; if ( Path::HasExtension( path1 ) ) { Console::WriteLine( "{0} has an extension.", path1 ); } if ( !Path::HasExtension( path2 ) ) { Console::WriteLine( "{0} has no extension.", path2 ); } if ( !Path::IsPathRooted( path3 ) ) { Console::WriteLine( "The string {0} contains no root information.", path3 ); } Console::WriteLine( "The full path of {0} is {1}.", path3, Path::GetFullPath( path3 ) ); Console::WriteLine( "{0} is the location for temporary files.", Path::GetTempPath() ); Console::WriteLine( "{0} is a file available for use.", Path::GetTempFileName() ); Console::WriteLine( "\r\nThe set of invalid characters in a path is:" ); Console::WriteLine( "(Note that the wildcard characters '*' and '?' are not invalid.):" ); Collections::IEnumerator^ myEnum = Path::InvalidPathChars->GetEnumerator(); while ( myEnum->MoveNext() ) { Char c = *safe_cast<Char^>(myEnum->Current); Console::WriteLine( c ); } }
import System.*; import System.IO.*; class Test { public static void main(String[] args) { String path1 = "c:\\temp\\MyTest.txt"; String path2 = "c:\\temp\\MyTest"; String path3 = "temp"; if (Path.HasExtension(path1)) { Console.WriteLine("{0} has an extension.", path1); } if (!(Path.HasExtension(path2))) { Console.WriteLine("{0} has no extension.", path2); } if (!(Path.IsPathRooted(path3))) { Console.WriteLine("The string {0} contains no root information.", path3); } Console.WriteLine("The full path of {0} is {1}.", path3, Path.GetFullPath(path3)); Console.WriteLine("{0} is the location for temporary files.", Path.GetTempPath()); Console.WriteLine("{0} is a file available for use.", Path.GetTempFileName()); Console.WriteLine("\r\nThe set of invalid characters in a path is:"); Console.WriteLine("(Note that the wildcard characters '*' and '?' " + "are not invalid.):"); char c = ' '; for (int iCtr = 0; iCtr < Path.InvalidPathChars.get_Length(); iCtr++) { c = Path.InvalidPathChars[iCtr]; Console.WriteLine(c); } } //main } //Test

System.IO.Path


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Path フィールド
Path メソッド


Path メンバ
ファイルまたはディレクトリのパス情報を格納する String インスタンスで操作を実行します。これらの操作は、プラットフォーム間で実行されます。



Path
パス
パス
一般名称
pass
- 通過。
- パス(宇宙機)。水平線上にある衛星等が特定の地上局等と通信可能な期間のこと。
- 通行許可(証)。出入りに許可が必要な施設のゲートを通過するものなど。
- 合格。
- パス (スポーツ) - ボールなどを味方に渡すこと。
- ターン制のゲームで、自分のターンを自発的に休むこと。転じて、何かをするのを断る意味や、しないことにする意味にも使われる。
- 性同一性障害者が、自分が望む方の性であるように周囲から認識されること。パッシングとも言う。それが失敗することをリード(read)という。
- 同様の処理を複数回ほどこすときの1回。2パス、圧延パスなど。動画や音声の圧縮時のパス回数については「可変ビットレート#平均ビットレート(ABR)」を参照。
path
- 小道、通路、道程。
- パス (コンピュータ) (path) - コンピュータのファイルシステムで、ファイルやディレクトリの所在を示す文字列。
- 道 (グラフ理論) - グラフ理論で、通路。
- 道 (トポロジー)
その他
- 膿 (pus)
- パラアミノサリチル酸 (paraaminosalicylic acid) - 結核薬に使われる化学物質。
- オイルパステル (oil pastel) - クレパス(商品名)の類の一般名。
固有名称
- 人物
- オクタビオ・パス (Octavio Paz) - メキシコの詩人・批評家・外交官 (1914–1998)。
- ジョー・パス (Joe Pass) - アメリカのジャズギタリスト (1929–1994)。
- ネルソン・パス (Nelson Pass) - アメリカのオーディオアンプ設計者 (1951–)。
- ルベン・パス (Rubén Paz) - ウルグアイのサッカー選手 (1959–)。
- PATH (環境変数) - MS-DOSなどのシステム環境変数。
- The Path - 童話赤頭巾をモチーフにしたホラーゲーム。
- パストレイン (Port Authority Trans-Hudson) - アメリカPANYNJ公社の鉄道。
- Path (SNS) - 韓国企業カカオによって買収され運営していたインスタントメッセンジャー。
- パス株式会社(PATH corporation)[1] - 東京都の化粧品や健康商品業。東証スタンダード市場3840、法人番号:1011001070286。旧商号「イー・キャッシュ」。決済代行事業は2017年ユニヴァ・ペイキャスト [2]に譲渡し廃止[1]。
- ヤマハ・PAS - ヤマハ発動機の電動アシスト自転車。
- Pas Cultural and Sport Club - イランのマルチスポーツクラブ。
- パス・テヘランFC (PAS Tehran F.C.) - テヘランのサッカークラブ。
- パス・ハマダーンFC (PAS Hamedan F.C.) - ハマダーンのサッカークラブ。
- パス川 (Pas) - スペインの川。
脚注
- ^ パス(3840)、決済代行事業を譲渡および廃止|M&Aニュース(2016.11 日本M&Aセンター)
path
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2022/03/10 04:06 UTC 版)
投稿が配送されたニュースサーバの経路のこと。pathヘッダーに「!」で区切られて記載されている。
※この「path」の解説は、「ネットニュース」の解説の一部です。
「path」を含む「ネットニュース」の記事については、「ネットニュース」の概要を参照ください。
- pathのページへのリンク