streamdata: path helper
This prints ident string joined with base directory pathname. Signed-off-by: Yonah <contrib@gensokyo.uk>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user