]> woffs.de Git - fd/haskell-amqp-utils.git/blobdiff - Network/AMQP/Utils/Options.hs
removeSentFileIfRequested
[fd/haskell-amqp-utils.git] / Network / AMQP / Utils / Options.hs
index 6654da2815c5d7f19014250009c845c4274a2184..0ee7bf4525622dc2e71329d6b586a4a63e3b7fdd 100644 (file)
@@ -69,6 +69,7 @@ data Args =
     , connect_timeout :: Int
     , simple          :: Bool
     , cleanupTmpFile  :: Bool
+    , removeSentFile  :: Bool
     }
 
 instance Default Args where
@@ -120,6 +121,7 @@ instance Default Args where
       600
       False
       False
+      False
 
 -- | all options
 allOptions :: [(String, OptDescr (Args -> Args))]
@@ -300,6 +302,12 @@ allOptions =
         ["suffix"]
         (ReqArg (\s o -> o {suffix = s : (suffix o)}) "SUFFIX")
         "Allowed file suffixes in hotfolder mode")
+  , ( "a"
+    , Option
+        ['u']
+        ["remove"]
+        (NoArg (\o -> o {removeSentFile = not (removeSentFile o)}))
+        ("Toggle removal of sent file (default: " ++ show (removeSentFile def) ++ ")"))
   , ( "a"
     , Option
         ['m']
don't click here