|
definition: |
saveOldFile :: String -> IO ()
saveOldFile fname = do
exfname <- doesFileExist fname
when exfname $ do
mdate <- getModificationTime fname
ctime <- toCalendarTime mdate
let savename = fname ++ "." ++
intercalate "_"
(map (\f -> show (f ctime))
[ctYear,ctMonth,ctDay,ctHour,ctMin,ctSec])
renameFile fname savename
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
If a file with the given name `fname` exists, it is moved to the file `fname.date`, where `date` is the modification date of this file. |
|
failfree: |
_ |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_) |-> _}
|
|
name: |
saveOldFile |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
String -> Prelude.IO () |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |