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

Write() public method

This method write the queue content to the filesystem
public Write ( ) : void
return void
        public void Write()
        {
            if (write_queue.Count == 0) // means is empty thus we don't need to do anything
                return;

            // first we write every single object in the write_queue
            foreach (Object o in write_queue.ToArray ()) {
                WriteBuffer (o.Id, o.Content);
            }

            // now we clear the queue
            write_queue.Clear ();
        }

Usage Example

Example #1
0
        public static void CheckinObject(string filePath, string storePath)
        {
            ObjectStore store = new ObjectStore (storePath);
            store.Checkin (filePath);

            store.Write ();
        }