From 2ecbe281b0351e630c7730b44c1f4a9c3b3062a5 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Sun, 26 Aug 2018 21:22:32 -0400 Subject: Initial commit --- src/PhotoPath.cs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/PhotoPath.cs (limited to 'src/PhotoPath.cs') diff --git a/src/PhotoPath.cs b/src/PhotoPath.cs new file mode 100644 index 0000000..71c3bdf --- /dev/null +++ b/src/PhotoPath.cs @@ -0,0 +1,38 @@ +using System.IO; + +namespace iPhotoExtractor +{ + enum PhotoPathType + { + Original, + Modified, + Other + } + + class PhotoPath + { + public PhotoPathType PathType { get; } + public string RelativePath { get; } + + public PhotoPath(string relativePath) + { + RelativePath = relativePath; + string[] parts = relativePath.Split(Path.DirectorySeparatorChar); + + switch(parts[0].ToLower()) + { + case "originals": + PathType = PhotoPathType.Original; + break; + + case "modified": + PathType = PhotoPathType.Modified; + break; + + default: + PathType = PhotoPathType.Other; + break; + } + } + } +} \ No newline at end of file -- cgit v1.2.3