Facebook
From Przemyslaw Starosta, 3 Years ago, written in C.
Embed
Download Paste or View Raw
Hits: 124
  1. public static void CzyIstnieje(string path)
  2.         {
  3.             try
  4.             {
  5.                 if (!Directory.Exists(path))
  6.                 {
  7.                     Directory.CreateDirectory(path);
  8.                     Console.WriteLine("Stworzyłem");
  9.                 }
  10.                 else
  11.                 {
  12.                     Console.WriteLine("Istnieje");
  13.                 }
  14.             }
  15.             catch (Exception)
  16.             {
  17.                 Console.WriteLine("Błąd");
  18.             }
  19.         }
  20.         static void Main(string[] args)
  21.         {
  22.             CzyIstnieje(@"C:\Temp");
  23.             Console.ReadLine();
  24.         }
  25.     }