FileInfo.cs 749 B

1234567891011121314151617181920212223242526272829
  1. using System.IO;
  2. namespace PixiEditor.SDK.FileParsers
  3. {
  4. public class FileInfo
  5. {
  6. /// <summary>
  7. /// Gets the file name without the file extension
  8. /// </summary>
  9. public string FileName { get; private set; }
  10. /// <summary>
  11. /// Gets the file extension of the file, including the dot
  12. /// </summary>
  13. public string FileExtension { get; private set; }
  14. internal FileInfo(string path)
  15. {
  16. FileName = Path.GetFileNameWithoutExtension(path);
  17. FileExtension = Path.GetExtension(path);
  18. }
  19. internal FileInfo(string name, string extension)
  20. {
  21. FileName = name;
  22. FileExtension = extension;
  23. }
  24. }
  25. }