Qiniu.Storage.Persistent.ResumeRecorder.get C# (CSharp) Method

get() public method

获取上传进度记录
public get ( string key ) : byte[]
key string 记录文件名
return byte[]
        public byte[] get(string key)
        {
            byte[] data = null;
            string filePath = Path.Combine(this.dir, key);
            try
            {
                using (FileStream stream =
                    new FileStream(filePath, FileMode.Open, FileAccess.Read))
                {
                    data = new byte[stream.Length];
                    stream.Read(data, 0, data.Length);
                }
            }
            catch (Exception)
            {

            }
            return data;
        }