Ejemplo n.º 1
0
 public override bool Write(string path, byte[] data, int length)
 {
     lock (this.ioLock)
     {
         bool      flag      = true;
         IRailFile irailFile = !rail_api.RailFactory().RailStorageHelper().IsFileExist(path) ? rail_api.RailFactory().RailStorageHelper().CreateFile(path) : rail_api.RailFactory().RailStorageHelper().OpenFile(path);
         if (irailFile != null)
         {
             int num = (int)irailFile.Write(data, (uint)length);
             irailFile.Close();
         }
         else
         {
             flag = false;
         }
         return(flag);
     }
 }
Ejemplo n.º 2
0
 public override bool Write(string path, byte[] data, int length)
 {
     lock (ioLock)
     {
         bool      result = true;
         IRailFile val    = null;
         val = ((!rail_api.RailFactory().RailStorageHelper().IsFileExist(path)) ? rail_api.RailFactory().RailStorageHelper().CreateFile(path) : rail_api.RailFactory().RailStorageHelper().OpenFile(path));
         if (val != null)
         {
             val.Write(data, (uint)length);
             val.Close();
         }
         else
         {
             result = false;
         }
         return(result);
     }
 }