initial commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Intelix.Helper.Data;
|
||||
|
||||
public class ArchiveStructure
|
||||
{
|
||||
private readonly string _rootFolderName;
|
||||
|
||||
public string RootFolderName => _rootFolderName;
|
||||
|
||||
public ArchiveStructure(string countryCode, string ipAddress, string hwid)
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
string date = now.ToString("yyyy-M-d");
|
||||
string time = now.ToString("H_m_s");
|
||||
_rootFolderName = $"{countryCode}_{ipAddress}_{date} {time}_{hwid}";
|
||||
}
|
||||
|
||||
public string GetPath(string relativePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(relativePath))
|
||||
{
|
||||
return _rootFolderName;
|
||||
}
|
||||
return $"{_rootFolderName}/{relativePath}";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user