public override void Read(string path, byte[] buffer, int size) { lock (ioLock) { IRailFile val = rail_api.RailFactory().RailStorageHelper().OpenFile(path); if (val != null) { val.Read(buffer, (uint)size); val.Close(); } } }
public override void Read(string path, byte[] buffer, int size) { lock (this.ioLock) { IRailFile irailFile = rail_api.RailFactory().RailStorageHelper().OpenFile(path); if (irailFile == null) { return; } int num = (int)irailFile.Read(buffer, (uint)size); irailFile.Close(); } }
public override int GetFileSize(string path) { lock (this.ioLock) { IRailFile irailFile = rail_api.RailFactory().RailStorageHelper().OpenFile(path); if (irailFile == null) { return(0); } int size = (int)irailFile.GetSize(); irailFile.Close(); return(size); } }
public override int GetFileSize(string path) { lock (ioLock) { IRailFile val = rail_api.RailFactory().RailStorageHelper().OpenFile(path); if (val != null) { int size = (int)val.GetSize(); val.Close(); return(size); } return(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); } }
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); } }