终端一体化运控平台
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LocaPath.cs 714 B

2 년 전
1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace BPASmartClient.Helper
  8. {
  9. public class LocaPath
  10. {
  11. private volatile static LocaPath _Instance;
  12. public static LocaPath GetInstance => _Instance ?? (_Instance = new LocaPath());
  13. private LocaPath() { }
  14. public string FilePath { get; set; } = string.Empty;
  15. public string Getpath(string name)
  16. {
  17. Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"{FilePath}\\JSON"));
  18. return $"{AppDomain.CurrentDomain.BaseDirectory}{FilePath}JSON\\{name}.json";
  19. }
  20. }
  21. }