예제 #1
0
 public static bool IsDirectory(GString Dir)
 {
     if (Directory.Exists(Dir.ToString()))
     {
         return(true);
     }
     return(false);
 }
예제 #2
0
 public override Int32    Send(GString s)
 {
     if (this._init)
     {
         Byte [] Message = System.Text.Encoding.ASCII.GetBytes(s.ToString());
         return(this._socket.Send(Message, 0, Message.Length, SocketFlags.None));
     }
     return(0);
 }
예제 #3
0
 public static Boolean Rmdir(GString Dir, bool Recursif)
 {
     Boolean test = true;
     try
     {
         Directory.Delete(Dir.ToString(), Recursif);
     }
     catch
     {
         test = false;
     }
     return (test);
 }
예제 #4
0
 public static Boolean Rename(GString f1, GString f2)
 {
     Boolean test = true;
     try
     {
         Directory.Move(f1.ToString(), f2.ToString());
     }
     catch
     {
         test = false;
     }
     return (test);
 }
예제 #5
0
 public bool Cd(GString Dir)
 {
     bool test = true;
     try
     {
         Directory.SetCurrentDirectory(Dir.ToString());
         this._directory = Directory.GetCurrentDirectory();
     }
     catch
     {
         test = false;
     }
     return (test);
 }
예제 #6
0
        public static Boolean  Rename(GString f1, GString f2)
        {
            Boolean test = true;

            try
            {
                Directory.Move(f1.ToString(), f2.ToString());
            }
            catch
            {
                test = false;
            }
            return(test);
        }
예제 #7
0
        public static Boolean  Rmdir(GString Dir, bool Recursif)
        {
            Boolean test = true;

            try
            {
                Directory.Delete(Dir.ToString(), Recursif);
            }
            catch
            {
                test = false;
            }
            return(test);
        }
예제 #8
0
        public bool         Cd(GString Dir)
        {
            bool test = true;

            try
            {
                Directory.SetCurrentDirectory(Dir.ToString());
                this._directory = Directory.GetCurrentDirectory();
            }
            catch
            {
                test = false;
            }
            return(test);
        }
예제 #9
0
 public GFileInfos(GString Dir, GString File)
 {
     this._file = System.IO.Path.Combine(Dir.ToString(), File.ToString());
 }
예제 #10
0
 /*public static GFileInfos[] Ls(GString Directory)
 {
     GFileInfos[] list;
     String[] files;
     files = Directory.GetFileSystemEntries(Directory);
     int filecount = files.GetUpperBound(0) + 1;
     int i = 0;
     while (i < filecount)
     {
         list[i] = files[i];
         ++i;
     }
     return (list);
 }*/
 public bool Mkdir(GString Dir)
 {
     bool test = true;
     try
     {
         Directory.CreateDirectory(System.IO.Path.Combine(this._directory.ToString(), Dir.ToString()));
     }
     catch
     {
         test = false;
     }
     return (test);
 }
예제 #11
0
 public static void Open(GString Drive)
 {
     mciSendString("open " + Drive.ToString() + ":\\ type cdaudio alias cdaudio", "", 0, 0);
     mciSendString("Set cdaudio door open wait", "", 0, 0);
     mciSendString("close cdaudio", "", 0, 0);
 }
예제 #12
0
 public static bool IsDirectory(GString Dir)
 {
     if (Directory.Exists(Dir.ToString()))
         return (true);
     return (false);
 }
예제 #13
0
 public GFileInfos(GString Dir, GString File)
 {
     this._file = System.IO.Path.Combine(Dir.ToString(), File.ToString());
 }
예제 #14
0
        public bool                 Mkpath(GString Path)
        {
            bool test = true;

            try
            {
                Directory.CreateDirectory(System.IO.Path.Combine(this._directory.ToString(), Path.ToString()));
            }
            catch
            {
                test = false;
            }
            return(test);
        }
예제 #15
0
 public override Int32 Send(GString s)
 {
     if (this._init)
     {
         Byte [] Message = System.Text.Encoding.ASCII.GetBytes(s.ToString());
         return (this._socket.Send (Message, 0, Message.Length, SocketFlags.None));
     }
     return (0);
 }
예제 #16
0
 public static void Close(GString Drive)
 {
     mciSendString("open " + Drive.ToString() + ":\\ type cdaudio alias cdaudio", "", 0, 0);
     mciSendString("Set cdaudio door closed wait", "", 0, 0);
     mciSendString("close cdaudio", "", 0, 0);
 }