From 10ed962bee81a66d123a877cc4721a3ec9830cff Mon Sep 17 00:00:00 2001 From: Yonah Date: Thu, 19 Mar 2026 01:51:07 +0900 Subject: [PATCH] streamdata: path helper This prints ident string joined with base directory pathname. Signed-off-by: Yonah --- streamdata.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/streamdata.go b/streamdata.go index bda67d2..c63eed1 100644 --- a/streamdata.go +++ b/streamdata.go @@ -202,6 +202,15 @@ func (c *Channel) Add(ident *Ident, f func(v *VOD, w io.Writer) error) error { return nil } +// Path returns a pathname by [Ident]. +func (c *Channel) Path(ident *Ident) string { + return path.Join( + c.root.Name(), + channelPathVOD, + ident.String()+ChannelVODSuffix, + ) +} + // All returns an iterator over all known [Ident] in the on-disk representation. // Iteration stops when encountering the first non-nil error, and its value is // saved to the value pointed to by errP.