diff options
Diffstat (limited to 'src/PhotoPath.cs')
-rw-r--r-- | src/PhotoPath.cs | 38 |
1 files changed, 38 insertions, 0 deletions
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 |