streamdata: path helper

This prints ident string joined with base directory pathname.

Signed-off-by: Yonah <contrib@gensokyo.uk>
This commit is contained in:
2026-03-19 01:51:07 +09:00
parent 63145c95bd
commit 10ed962bee

View File

@@ -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.