refactor: centralize cache path logic and add TMPDIR documentation

This commit is contained in:
V1ck3s
2026-01-11 00:24:29 +01:00
committed by Vickes
parent dbb1964f46
commit 61a21b0e0c
4 changed files with 15 additions and 3 deletions

View File

@@ -8,6 +8,17 @@ namespace octo_fiesta.Services.Common;
/// </summary>
public static class PathHelper
{
/// <summary>
/// Gets the cache directory path for temporary file storage.
/// Uses system temp directory combined with octo-fiesta-cache subfolder.
/// Respects TMPDIR environment variable on Linux/macOS.
/// </summary>
/// <returns>Full path to the cache directory.</returns>
public static string GetCachePath()
{
return Path.Combine(Path.GetTempPath(), "octo-fiesta-cache");
}
/// <summary>
/// Builds the output path for a downloaded track following the Artist/Album/Track structure.
/// </summary>