public int SetFilePointer(long offset, Wrap.EMoveMethod method) { DebugLogger.WriteLine($"VArchive SetFilePointer on {_filename} to {offset} from {method}"); switch (method) { case Wrap.EMoveMethod.Begin: _position = offset; break; case Wrap.EMoveMethod.End: _position = _size + offset; break; case Wrap.EMoveMethod.Current: _position += offset; break; } if (_position < 0) { return(-1); } if (_position > _size) { return(-1); } return((int)_position); }
public int SetFilePointer(long offset, Wrap.EMoveMethod method) { System.Diagnostics.Debug.WriteLine("VArchive SetFilePointer on {0} to {1} from {2}", _filename, offset, method); switch (method) { case Wrap.EMoveMethod.Begin: _position = offset; break; case Wrap.EMoveMethod.End: _position = _size + offset; break; case Wrap.EMoveMethod.Current: _position += offset; break; } if (_position < 0) { return(-1); } if (_position > _size) { return(-1); } return((int)_position); }
public int SetFilePointer(long offset, Wrap.EMoveMethod method) { switch (method) { case Wrap.EMoveMethod.Begin: _position = offset; break; case Wrap.EMoveMethod.End: _position = _size + offset; break; case Wrap.EMoveMethod.Current: _position += offset; break; } if (_position < 0) { return(-1); } if (_position > _size) { return(-1); } return((int)_position); }
public long SetPosition(long pos, Wrap.EMoveMethod type) { switch (type) { case Wrap.EMoveMethod.Begin: _position = pos; break; case Wrap.EMoveMethod.Current: _position += pos; break; case Wrap.EMoveMethod.End: _position = _source.Length + pos; break; } //DebugLogger.DetailedWriteLine("Moving VStream position to {_position}"); return(_position); }
public long SetPosition(long pos, Wrap.EMoveMethod type) { switch (type) { case Wrap.EMoveMethod.Begin: _position = pos; break; case Wrap.EMoveMethod.Current: _position += pos; break; case Wrap.EMoveMethod.End: _position = _source.Length + pos; break; } //RuntimeLog.Write("Moving VStream position to {0}", _position); return(_position); }