示例#1
0
文件: IOUtil.cs 项目: masroore/db4o
 /// <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
文件: IOUtil.cs 项目: pondyond/db4o
        /// <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
文件: IOUtil.cs 项目: yuuhhe/db4o
        /// <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));
            }
        }
		/// <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));
     }
 }