// New retrieves the complete state of the driver from the file if given
// and then ensures that all changes are mirrored immediately in the
// given file. If not given, the initial state is empty and changes
// are not saved.
New retrieves the complete state of the driver from the file if given
and then ensures that all changes are mirrored immediately in the
given file. If not given, the initial state is empty and changes
are not saved.
// New retrieves the complete state of the driver from the file if given // and then ensures that all changes are mirrored immediately in the // given file . If not given the initial state is empty and changes // are not saved .
func New(statefilePath string) (State, error) {
	s := &state{
		statefilePath: statefilePath,
	}
	return s, s.restore()
}
func New ( statefilePath string ) ( State , error ) { s := & state { statefilePath : statefilePath , } return s , s . restore ( ) }
New retrieves the complete state of the driver from the file if given
and then ensures that all changes are mirrored immediately in the
given file.
New retrieves the complete state of the driver from the file if given and then ensures that all changes are mirrored immediately in the given file .