Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 15f28fa7c8 | |||
| 6838d00a0a |
@@ -16,13 +16,13 @@ func (m *Machine) OpenFile(name string, flags int, args ...any) (fs.File, error)
|
|||||||
return fs.OpenFile(base, fullName, flags, 0644)
|
return fs.OpenFile(base, fullName, flags, 0644)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateTrunc creates or truncates a file on the machine's config directory
|
// CreateTruncFile creates or truncates a file on the machine's config directory
|
||||||
func (m *Machine) CreateTrunc(name string, args ...any) (fs.File, error) {
|
func (m *Machine) CreateTruncFile(name string, args ...any) (fs.File, error) {
|
||||||
return m.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, args...)
|
return m.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create creates a file on the machine's config directory
|
// CreateFile creates a file on the machine's config directory
|
||||||
func (m *Machine) Create(name string, args ...any) (fs.File, error) {
|
func (m *Machine) CreateFile(name string, args ...any) (fs.File, error) {
|
||||||
return m.OpenFile(name, os.O_RDWR|os.O_CREATE, args...)
|
return m.OpenFile(name, os.O_RDWR|os.O_CREATE, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user