<commit_before>package engines

import "io"

// The VolumeBuilder interface wraps the process of building a volume.
// Notably, it permits writing of files and folders into the volume before it
// is created.
//
// Once a BuildVolume() or Discard() have been called the VolumeBuilder object
// is invalid and resources held by it should be considered transferred or
// released.
type VolumeBuilder interface {
	// Write a folder to the volume being built.
	//
	// Name must be a slash separated path, there is no requirement that
	// intermediate folders have been created.
	WriteFolder(name string) error

	// Write a file to the volime being built.
	//
	// Name must be a slash separated path, there is no requirement that
	// intermediate folders have been created.
	WriteFile(name string) io.WriteCloser

	// Build a volume from the information passed in.
	//
	// This invalidates the VolumeBuilder, which cannot be reused.
	BuildVolume() (Volume, error)

	// Discard resources held by the VolumeBuilder
	//
	// This invalidates the VolumeBuilder, which cannot be reused.
	Discard() error
}

// Volume that we can modify and mount on a Sandbox.<commit_msg>Fixed typo in doc comment<commit_after>package engines

import "io"

// The VolumeBuilder interface wraps the process of building a volume.
// Notably, it permits writing of files and folders into the volume before it
// is created.
//
// Once a BuildVolume() or Discard() have been called the VolumeBuilder object
// is invalid and resources held by it should be considered transferred or
// released.
type VolumeBuilder interface {
	// Write a folder to the volume being built.
	//
	// Name must be a slash separated path, there is no requirement that
	// intermediate folders have been created.
	WriteFolder(name string) error

	// Write a file to the volume being built.
	//
	// Name must be a slash separated path, there is no requirement that
	// intermediate folders have been created.
	WriteFile(name string) io.WriteCloser

	// Build a volume from the information passed in.
	//
	// This invalidates the VolumeBuilder, which cannot be reused.
	BuildVolume() (Volume, error)

	// Discard resources held by the VolumeBuilder
	//
	// This invalidates the VolumeBuilder, which cannot be reused.
	Discard() error
}

// Volume that we can modify and mount on a Sandbox.
{'fraction_non_alphanumeric': 0.0711835334476844, 'fraction_numerical': 0.0, 'mean_word_length': 3.4438095238095237, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3466129', 'n_tokens_mistral': 612, 'n_tokens_neox': 589, 'n_words': 321}