diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-29 06:32:15 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-29 06:34:29 +0900 |
| commit | 44ba7a5f02b7575a706a22aac53c8ac608d18f23 (patch) | |
| tree | c08890b09a42c38bdf24b976421704ce83a74fad /system/link.go | |
| parent | dc467493d8a1461ea321ccf5ca3a2b037f880088 (diff) | |
hst/enablement: move bits from system
This is part of the hst API, should not be in the implementation package.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/link.go')
| -rw-r--r-- | system/link.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/system/link.go b/system/link.go index d463b623..50a05348 100644 --- a/system/link.go +++ b/system/link.go @@ -2,24 +2,26 @@ package system import ( "fmt" + + "hakurei.app/hst" ) // Link calls LinkFileType with the [Process] criteria. func (sys *I) Link(oldname, newname string) *I { return sys.LinkFileType(Process, oldname, newname) } // LinkFileType maintains a hardlink until its [Enablement] is no longer satisfied. -func (sys *I) LinkFileType(et Enablement, oldname, newname string) *I { +func (sys *I) LinkFileType(et hst.Enablement, oldname, newname string) *I { sys.ops = append(sys.ops, &hardlinkOp{et, newname, oldname}) return sys } // hardlinkOp implements [I.LinkFileType]. type hardlinkOp struct { - et Enablement + et hst.Enablement dst, src string } -func (l *hardlinkOp) Type() Enablement { return l.et } +func (l *hardlinkOp) Type() hst.Enablement { return l.et } func (l *hardlinkOp) apply(sys *I) error { sys.msg.Verbose("linking", l) |
