英語版
このページの英語版を見る
dmd.root.filename
パス名とファイル名を囲む。
Authors: 
Walter Bright, https://www.digitalmars.com
License: 
適用範囲 https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/filename.d
- structFileName;
- パス名とファイル名をカプセル化する。- pure nothrow this(const char[]str);
- static pure nothrow FileNamecreate(const(char)*name);
- static pure nothrow @nogc boolequals(const(char)*name1, const(char)*name2);
 static pure nothrow @nogc boolequals(const char[]name1, const char[]name2);
- プラットフォームの規則(大文字と小文字を区別するかどうか)に従って2つの名前を比較する
- static pure nothrow @nogc boolabsolute(const(char)*name);
 static pure nothrow @nogc @safe boolabsolute(const char[]name);
- パスが絶対パスかどうかを判断する。Parameters:const(char)* nameパス Returns:絶対パス名であれば true を返す。
- static nothrow const(char)*toAbsolute(const(char)*name, const(char)*base= null);
- 指定された名前を絶対パスとして返すParameters:const(char)* nameパス const(char)* base相対パスである場合、名前の前に付加する絶対ベースパスを返す Returns:ベースに対する相対パスとして名前を絶対パスにする
- static pure nothrow @nogc const(char)*ext(const(char)*str);
 static pure nothrow @nogc @safe const(char)[]ext(const char[]str);
- 入力のスライスとしてファイル名の拡張子を決定する。Parameters:const(char)* strファイル名 Returns: ファイル名拡張子(読み取り専用)。拡張子の「.」以降を指す。該当するものがなければ、nullを返す。ファイル名拡張子(読み取り専用)。 拡張子の「.」以降を指す。 該当するものがない場合は、nullを返す。
- static nothrow const(char)*removeExt(const(char)*str);
 static nothrow const(char)[]removeExt(const char[]str);
- 拡張子を除いたファイル名を返す。TODO スライスが至る所で使用され、\0 が想定されていない場合、 これはシンプルなスライスに変換できる。 Parameters:const(char)* strファイル名 Returns:拡張子を除いたファイル名をmallocしたもの。
- static nothrow const(char)[]sansExt(const char[]filename);
- 拡張子を除いたファイル名。Parameters:char[] filenameファイル名 Returns: スライススライス
- static pure nothrow @nogc const(char)*name(const(char)*str);
 static pure nothrow @nogc @safe const(char)[]name(const char[]str);
- パスを除いたファイル名を返す(読み取り専用)。
- static nothrow const(char)*path(const(char)*str);
 static nothrow const(char)[]path(const char[]str);
- strのパス部分を返す。 返された文字列は新たに割り当てられる。 パスには末尾のパス区切り文字は含まれない。
- static nothrow const(char)[]replaceName(const char[]path, const char[]name);
- パスのファイル名部分を置き換える。
- static nothrow const(char)*combine(const(char)*path, const(char)*name);
 static nothrow const(char)[]combine(const char[]path, const char[]name);
- pathファイルを結合する- nameParameters:- const(char)* - path- 追加するパス - const(char)* - name- パスに追加する名前 Returns: xml-ph-0000@deepl.internalで終了する文字列で、これは組み合わせである。\0 で終了する文字列は、- path、- name有効なパスを組み合わせたもの。
- static nothrow voidsplitPath(int delegate(const(char)*) nothrowsink, const(char)*path);
- (getenv("PATH") が返すような)パスを分割し、各部分を mem.xmalloc で確保する ダブルクォートと ~ を処理する 各部分を sink() に渡すParameters:int delegate(const(char)*) nothrow sinkパス部分をここに送る。sink()が0以外の値を返したら終了する。 const(char)* path分割するパス。 
- static pure nothrow char[]addExt(const char[]name, const char[]ext);
- 拡張子を追加するextname、コンテンツに関係なくnameParameters:char[] name拡張子を追加するパス char[] ext追加する拡張子(ピリオドは含めないこと) Returns: 新たに割り当てられた文字列(xml-ph-0000@deepl.internal までお問い合わせください)新たに割り当てられた文字列(FileName.free で入手可能)
- static nothrow const(char)*defaultExt(const(char)*name, const(char)*ext);
 static nothrow const(char)[]defaultExt(const char[]name, const char[]ext);
- FileName::free()の戻り値(無料)
- static nothrow const(char)*forceExt(const(char)*name, const(char)*ext);
 static nothrow const(char)[]forceExt(const char[]name, const char[]ext);
- FileName::free()の戻り値を解放する
- static pure nothrow @nogc boolequalsExt(const(char)*name, const(char)*ext);
 static pure nothrow @nogc boolequalsExt(const char[]name, const char[]ext);
- Returns:true ifname拡張子がext
- const pure nothrow @nogc boolequalsExt(const(char)*ext);
- 拡張子が一致した場合、Return !=0。
- static nothrow const(char)*searchPath(const ref Stringspath, const(char)*name, boolcwd);
- ファイルの検索パス。Parameters: パス文字列の配列Strings pathパス文字列の配列 const(char)* name検索対象のファイル bool cwdtrue は、パスを検索する前にカレントディレクトリを検索することを意味する Returns:見つかった場合は、ファイル名とパスを結合し、それ以外はnullとする
- static pure nothrow @nogc @safe size_tfindReservedChar(const char[]name);
- パスに予約文字が含まれているかどうかを判断する。Parameters:char[] nameパス Returns: パスに予約文字が含まれているかどうかを判断する。見つかった場合は、パス内の最初の予約文字のインデックス。見つからなかった場合は、size_t.max。パス内の最初の予約文字のインデックス。見つかった場合はsize_t.max、それ以外は
- static pure nothrow @nogc @safe boolrefersToParentDir(const char[]name);
- パスが親ディレクトリを参照しているかどうかを判断する。Parameters:char[] nameパス Returns:パスが親ディレクトリへの参照 '..' を含む場合は true
- static nothrow intexists(const(char)*name);
 static nothrow intexists(const char[]name);
- path が指し示すファイルが存在するかどうかを確認するReturns: 0 存在しない場合 1 存在し、かつディレクトリではない場合 2 存在し、かつディレクトリである場合0:存在しない場合 1:存在し、かつ、ディレクトリではない場合 2:存在し、かつ、ディレクトリである場合
- static nothrow boolensurePathExists(const char[]path);
 static nothrow boolensurePathExists(const(char)*path);
- 指定されたパスが存在することを確認するファイルまたはディレクトリへのパスを受け付ける。 前者の場合、ベースパス(包含ディレクトリへのパス)が 存在するかどうかが確認され、存在しない場合は作成される。 後者の場合、指定されたディレクトリが存在するかどうかが確認され、 必要に応じて作成される。Parameters:char[] pathファイルまたはディレクトリへのパス Returns: ディレクトリが存在するか、または正常に作成された場合true ディレクトリが存在するか、正常に作成された場合
- static nothrow const(char)*canonicalName(const(char)*name);
 static nothrow const(char)[]canonicalName(const char[]name);
- 名前の正規版を返す。 このコードはリスクが高い。
- static pure nothrow voidfree(const(char)*str);
- FileNameルーチンによって割り当てられたメモリを解放する
 
Copyright © 1999-2025 by the D Language Foundation
DEEPL APIにより翻訳、ところどころ修正。
このページの最新版(英語)
このページの原文(英語)
翻訳時のdmdのバージョン: 2.109.1
サイト全体のドキュメントのdmdのバージョン: 2.109.1
最新のdmdのバージョン: 2.111.0 ダウンロード
翻訳日付:
HTML生成日時:
編集者: dokutoku