classifyPhoto :: PictureStuff -> DateStuff -> String -> IO ()
classifyPhoto p (DateStuff (y,m,d)) w = let f = takeFileName (picName p) in 
                                            let dout = takeDirectory (picName p) in 
                                                  cDir True (outDir dout)>>
                                                  copyFile (picName p) (outDirFile dout f) >>
                                                  cDir True (outDirYear dout y) >> 
                                                  cDir True (outDirMonth dout y m) >> 
                                                  cDir True (outDirWeek dout y w) >>
                                                  createSymbolicLink (outDirFile dout f) (joinPath [outDirMonth dout y m, f]) >> 
                                                  createSymbolicLink (outDirFile dout f) (joinPath [outDirWeek dout y w, f]) 
                                                      where
                                                      cDir = createDirectoryIfMissing
                                                      outDir d = joinPath [d, "output"]
                                                      outDirFile d f = joinPath [outDir d, f]
                                                      outDirYear d y = joinPath [outDir d, y]
                                                      outDirMonth d y m = joinPath [outDirYear d y, m]
                                                      outDirWeek d y w = joinPath [outDirYear d y, w]
classifyPhoto :: PictureStuff -> DateStuff -> String -> IO ()
classifyPhoto p (DateStuff (y,m,d)) w = let f = takeFileName (picName p) in 
                                            let dout = takeDirectory (picName p) in 
                                                  cDir True (outDir dout)>>
                                                  copyFile (picName p) (outDirFile dout f) >>
                                                  cDir True (outDirYear dout y) >> 
                                                  cDir True (outDirMonth dout y m) >> 
                                                  cDir True (outDirWeek dout y w) >>
                                                  createSymbolicLink (outDirFile dout f) (joinPath [outDirMonth dout y m, f]) >> 
                                                  createSymbolicLink (outDirFile dout f) (joinPath [outDirWeek dout y w, f]) 
                                                      where
                                                      cDir = createDirectoryIfMissing
                                                      outDir d = joinPath [d, "output"]
                                                      outDirFile d f = joinPath [outDir d, f]
                                                      outDirYear d y = joinPath [outDir d, y]
                                                      outDirMonth d y m = joinPath [outDirYear d y, m]
                                                      outDirWeek d y w = joinPath [outDirYear d y, w]
classifyPhoto p (DateStuff (y,m,d)) w = let f = takeFileName (picName p) in 
                                            let dout = takeDirectory (picName p) in 
                                                  cDir True (outDir dout)>>
                                                  copyFile (picName p) (outDirFile dout f) >>
                                                  cDir True (outDirYear dout y) >> 
                                                  cDir True (outDirMonth dout y m) >> 
                                                  cDir True (outDirWeek dout y w) >>
                                                  createSymbolicLink (outDirFile dout f) (joinPath [outDirMonth dout y m, f]) >> 
                                                  createSymbolicLink (outDirFile dout f) (joinPath [outDirWeek dout y w, f]) 
                                                      where
                                                      cDir = createDirectoryIfMissing
                                                      outDir d = joinPath [d, "output"]
                                                      outDirFile d f = joinPath [outDir d, f]
                                                      outDirYear d y = joinPath [outDir d, y]
                                                      outDirMonth d y m = joinPath [outDirYear d y, m]
                                                      outDirWeek d y w = joinPath [outDirYear d y, w]