Пример #1
0
 /// <summary>Deletes the directory</summary>
 /// <exception cref="System.IO.IOException"></exception>
 public static void DeleteDir(string dir)
 {
     var absolutePath = new File(dir).GetCanonicalPath();
     var fDir = new File(dir);
     if (fDir.IsDirectory())
     {
         var files = fDir.List();
         for (var i = 0; i < files.Length; i++)
         {
             DeleteDir(Path.Combine(absolutePath, files[i]));
         }
     }
     File4.Delete(dir);
 }
Пример #2
0
		/// <summary>Deletes the directory</summary>
		/// <exception cref="System.IO.IOException"></exception>
		public static void DeleteDir(string dir)
		{
			string absolutePath = new Sharpen.IO.File(dir).GetCanonicalPath();
			Sharpen.IO.File fDir = new Sharpen.IO.File(dir);
			if (fDir.IsDirectory())
			{
				string[] files = fDir.List();
				for (int i = 0; i < files.Length; i++)
				{
					DeleteDir(Path.Combine(absolutePath, files[i]));
				}
			}
			File4.Delete(dir);
		}
Пример #3
0
        /// <summary>Deletes the directory</summary>
        /// <exception cref="System.IO.IOException"></exception>
        public static void DeleteDir(string dir)
        {
            var absolutePath = new File(dir).GetCanonicalPath();
            var fDir         = new File(dir);

            if (fDir.IsDirectory())
            {
                var files = fDir.List();
                for (var i = 0; i < files.Length; i++)
                {
                    DeleteDir(Path.Combine(absolutePath, files[i]));
                }
            }
            File4.Delete(dir);
        }
Пример #4
0
 /// <exception cref="System.IO.IOException"></exception>
 internal void EnsureDirExists(string path)
 {
     Sharpen.IO.File file = new Sharpen.IO.File(path);
     if (!file.Exists())
     {
         file.Mkdirs();
     }
     if (file.Exists() && file.IsDirectory())
     {
     }
     else
     {
         throw new IOException(Db4objects.Db4o.Internal.Messages.Get(37, path));
     }
 }
Пример #5
0
        /// <summary>Deletes the directory</summary>
        /// <exception cref="System.IO.IOException"></exception>
        public static void DeleteDir(string dir)
        {
            string absolutePath = new Sharpen.IO.File(dir).GetCanonicalPath();

            Sharpen.IO.File fDir = new Sharpen.IO.File(dir);
            if (fDir.IsDirectory())
            {
                string[] files = fDir.List();
                for (int i = 0; i < files.Length; i++)
                {
                    DeleteDir(Path.Combine(absolutePath, files[i]));
                }
            }
            File4.Delete(dir);
        }
Пример #6
0
        /// <exception cref="System.IO.IOException"></exception>
        internal void EnsureDirExists(string path)
        {
            var file = new File(path);

            if (!file.Exists())
            {
                file.Mkdirs();
            }
            if (file.Exists() && file.IsDirectory())
            {
            }
            else
            {
                throw new IOException(Messages.Get(37, path));
            }
        }
Пример #7
0
		/// <exception cref="System.IO.IOException"></exception>
		internal void EnsureDirExists(string path)
		{
			Sharpen.IO.File file = new Sharpen.IO.File(path);
			if (!file.Exists())
			{
				file.Mkdirs();
			}
			if (file.Exists() && file.IsDirectory())
			{
			}
			else
			{
				throw new IOException(Db4objects.Db4o.Internal.Messages.Get(37, path));
			}
		}
Пример #8
0
 /// <exception cref="System.IO.IOException"></exception>
 internal void EnsureDirExists(string path)
 {
     var file = new File(path);
     if (!file.Exists())
     {
         file.Mkdirs();
     }
     if (file.Exists() && file.IsDirectory())
     {
     }
     else
     {
         throw new IOException(Messages.Get(37, path));
     }
 }