summaryrefslogtreecommitdiff
path: root/internal/file.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-03-07 22:39:05 +0200
committerPaul Buetow <paul@buetow.org>2025-03-07 22:39:05 +0200
commitc78b30591644d4b7ab7b68b7ccba978e4f702bc8 (patch)
treecb2e972d32e3f129070f7780f16a00b8639f3678 /internal/file.go
parentc2f6fe55b1f6e5b3c81040294bae3af520b3f4cd (diff)
more on filters, needs more testing
Diffstat (limited to 'internal/file.go')
-rw-r--r--internal/file.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/file.go b/internal/file.go
index efb570b..fe519ba 100644
--- a/internal/file.go
+++ b/internal/file.go
@@ -9,6 +9,7 @@ import (
type file interface {
String() string
+ Name() string
}
type fdFile struct {
@@ -27,6 +28,10 @@ func newFdFileWithPid(fd int32, pid uint32) fdFile {
return fdFile{fd, "?"}
}
+func (f fdFile) Name() string {
+ return f.name
+}
+
func (f fdFile) String() string {
var sb strings.Builder
@@ -46,6 +51,10 @@ type oldnameNewnameFile struct {
oldname, newname string
}
+func (f oldnameNewnameFile) Name() string {
+ return f.newname
+}
+
func (f oldnameNewnameFile) String() string {
var sb strings.Builder
@@ -61,6 +70,10 @@ type pathnameFile struct {
pathname string
}
+func (f pathnameFile) Name() string {
+ return f.pathname
+}
+
func (f pathnameFile) String() string {
var sb strings.Builder