[erlang-questions] erl_tar:add continue on error
Tiago Cury
tcury@REDACTED
Sat Jun 8 21:27:53 CEST 2013
I wrote some records to a file and the surprise ….
Air11:Backuper tcury$ file /tmp/a.ea
/tmp/a.ea: DBase 3 data file with memo(s) (1634009600 records)
LOLLLLLLL
On Jun 8, 2013, at 4:41 AM, Peer Stritzinger <peerst@REDACTED> wrote:
> On 2013-06-07 20:15:39 +0000, Tiago Cury said:
>
>> Hi, I'm using erl_tar:add to create a backup from my server, but when it finds a kind of file type like socket it returns
>> immediately with a tuple {error, reason
>> } and aborts the entire process.
>> Is there a way to erl_tar:add ignore these errors (skip just the bad file) and continue the operation?
>
> You could use filelib:fold_files to recurse over the tree calling erl_tar:add on what it findes.
>
> According to its documentation it only recurses over regular files.
>
> Cheers
> -- Peer
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list