Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ea3906d63 | |||
| 6e0bf95fdf | |||
| 472b014a74 | |||
| 30b15da87d | |||
| da38250465 | |||
| bdf0192ac5 | |||
| 194f03c86a |
@@ -12,10 +12,9 @@ import (
|
||||
|
||||
// OpenFile opens a file on the machine's config directory with the specified flags
|
||||
func (m *Machine) OpenFile(name string, flags int, args ...any) (fs.File, error) {
|
||||
base := m.zone.zones.dir
|
||||
fullName := m.getFilename(name, args...)
|
||||
|
||||
return fs.OpenFile(base, fullName, flags, 0644)
|
||||
return m.zone.zones.OpenFile(fullName, flags)
|
||||
}
|
||||
|
||||
// CreateTruncFile creates or truncates a file on the machine's config directory
|
||||
@@ -57,10 +56,9 @@ func (m *Machine) RemoveFile(name string, args ...any) error {
|
||||
|
||||
// ReadFile reads a file from the machine's config directory
|
||||
func (m *Machine) ReadFile(name string, args ...any) ([]byte, error) {
|
||||
base := m.zone.zones.dir
|
||||
fullName := m.getFilename(name, args...)
|
||||
|
||||
return fs.ReadFile(base, fullName)
|
||||
return m.zone.zones.ReadFile(fullName)
|
||||
}
|
||||
|
||||
// WriteStringFile writes the given content to a file on the machine's config directory
|
||||
|
||||
Reference in New Issue
Block a user