(path string, state State)
| 50 | } |
| 51 | |
| 52 | func (f *freezerController) changeState(path string, state State) error { |
| 53 | return os.WriteFile( |
| 54 | filepath.Join(f.root, path, "freezer.state"), |
| 55 | []byte(strings.ToUpper(string(state))), |
| 56 | defaultFilePerm, |
| 57 | ) |
| 58 | } |
| 59 | |
| 60 | func (f *freezerController) state(path string) (State, error) { |
| 61 | current, err := os.ReadFile(filepath.Join(f.root, path, "freezer.state")) |