file.reconcileFolder rewrite

I made a bunch of changes to file.reconcileFolder, so many that it amounts to a rewrite. The changes are listed here.

1. The filter callback is now an optional parameter. If none is provided, we create one that just returns true for every file.

2. A new optional parameter, adrErrorTable. If it’s not nil, an error doesn’t stop the reconcile process. For each error a new sub-table is added to the error table. The sub-table contains the error string, the full path to the source and destination file. Here’s a screen shot of the table.

3. Error messages we generate in the script are now sentences in the form “Can’t do X because Y.”

4. Don’t roll the beachball (this might be running in a background thread or on a server, waste of cycles, distraction).

5. Renamed variables, factored code, declared two locals that weren’t declared. Added a changes section at the top of the script.

The new version of file.reconcileFolder has been released through the RSS-based updates feed for OPML Editor users. The part can be downloaded for use in other distributions.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: