bigloo.foreign.mkdir C# (CSharp) Method

mkdir() public static method

public static mkdir ( byte path, int mode ) : bool
path byte
mode int
return bool
        public static bool mkdir( byte[] path, int mode )
        {
            try
            {
               String s = newstring( path );
               DirectoryInfo dir = new DirectoryInfo( s );

               if (dir.Exists)
              return false;

               // !!!!! DirectoryInfo.Create is not implemented in pnet 0.5.4
               // dir.Create();
               Directory.CreateDirectory( s );

               dir= new DirectoryInfo( s );             // !!!!! bug in MS VM ?, dir must be reconstructed !!!!!

               return dir.Exists;
            }
            catch (Exception)
            {
               return false;
            }
        }
foreign