Git.Core.ObjectStore.WriteBuffer C# (CSharp) Method

WriteBuffer() private method

private WriteBuffer ( SHA1 id, byte content ) : void
id SHA1
content byte
return void
        private void WriteBuffer(SHA1 id, byte[] content)
        {
            try {
                CreateObjectParent (id);

                FileStream fs = File.Open (GetObjectFullPath (id), FileMode.CreateNew);
                BinaryWriter bw = new BinaryWriter (fs);

                bw.Write (Compress (content));

                bw.Close ();
                fs.Close ();
            } catch (Exception e) {
                Console.WriteLine ("The file object you are trying to write already exist");
            }
        }

Same methods

ObjectStore::WriteBuffer ( SHA1 id, byte content, bool overwrite ) : void