どうすぐの場合、ファイルが存在するクライアントまで、フルのC#/.います。

StackOverflow https://stackoverflow.com/questions/38960

  •  09-06-2019
  •  | 
  •  

質問

い試験を含む文字列にパスファイルが存在するファイルのようなもの -e 試験Perlの os.path.exists() Python)クライアントまで、フルのC#.

役に立ちましたか?

解決

用途:

File.Exists(path)

MSDN: http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx

編集:システム.IO

他のヒント

システム。IO.ファイル:

using System.IO;

if (File.Exists(path)) 
{
    Console.WriteLine("file exists");
} 

システム。IO.ファイルです。が存在する(パス)

msdn

完全パスとして入力します。を避ける相対パス。

 return File.Exists(FinalPath);
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top