main = do
    args <- getArgs
    let f = getFlags $ filter isFlag args 
    let paths = filter (not.isFlag) args
    if (paths == [])
        then printAllFiles "." f
        else do
            let mult = f .|. if length paths == 2 then 8 else 0
            mapM_ (`printAllFiles` mult) paths
main = do
    args <- getArgs
    let f = getFlags $ filter isFlag args 
    let paths = filter (not.isFlag) args
    if (paths == [])
        then printAllFiles "." f
        else do
            let mult = f .|. if length paths == 2 then 8 else 0
            mapM_ (`printAllFiles` mult) paths
main = do
    args <- getArgs
    let f = getFlags $ filter isFlag args 
    let paths = filter (not.isFlag) args
    if (paths == [])
        then printAllFiles "." f
        else do
            let mult = f .|. if length paths == 2 then 8 else 0
            mapM_ (`printAllFiles` mult) paths