diff options
author | Daniel Smith <rdnlsmith@gmail.com> | 2018-08-26 21:22:32 -0400 |
---|---|---|
committer | Daniel Smith <rdnlsmith@gmail.com> | 2018-08-26 21:22:32 -0400 |
commit | 2ecbe281b0351e630c7730b44c1f4a9c3b3062a5 (patch) | |
tree | 4c9ab179dd654230b4f9b29da8437bee9b0fffac /src/PhotoPath.cs |
Initial commit
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 |