Write() 공개 메소드

写入数据
public Write ( UInt32 position, byte arr ) : void
position System.UInt32
arr byte
리턴 void
예제 #1
0
파일: VFS.File.cs 프로젝트: bwbwbwbw/vfs
 /// <summary>
 /// 写入字节数据
 /// </summary>
 /// <param name="array"></param>
 /// <param name="offset"></param>
 /// <param name="count"></param>
 public void Write(byte[] array, UInt32 offset, UInt32 count)
 {
     byte[] arr = new byte[count];
     Buffer.BlockCopy(array, (int)offset, arr, 0, (int)count);
     inode.Write(position, arr);
     position += count;
 }
예제 #2
0
        /// <summary>
        /// 持久化该目录
        /// </summary>
        private void Save()
        {
            MemoryStream ms = new MemoryStream();

            Serializer.Serialize(ms, entries);
            byte[] bytes = ms.ToArray();
            inode.Write(bytes);
        }