TestFile() публичный статический Метод

Tests a file to see if it looks like a Cygwin socket file
public static TestFile ( string path ) : bool
path string The path to the file.
Результат bool
Пример #1
0
 /// <summary>
 /// Starts a msysgit style socket that can be used by the ssh program
 /// that comes with msysgit.
 /// </summary>
 /// <param name="path">The path to the socket file that will be created.</param>
 public void StartMsysSocket(string path)
 {
     if (disposed)
     {
         throw new ObjectDisposedException("PagentAgent");
     }
     if (msysSocket != null)
     {
         return;
     }
     // only overwrite a file if it looks like a MsysSocket file.
     // TODO: Might be good to test that there are not network sockets using
     // the port specified in this file.
     if (File.Exists(path) && MsysSocket.TestFile(path))
     {
         File.Delete(path);
     }
     msysSocket = new MsysSocket(path);
     msysSocket.ConnectionHandler = connectionHandler;
 }