// Generated by IcedCoffeeScript 1.7.1-c
(function() {
  var DropboxPreset, PresetBase, constants, path,
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  path = require('path');

  constants = require('../constants');

  PresetBase = require('./preset_base');

  DropboxPreset = (function(_super) {
    __extends(DropboxPreset, _super);

    function DropboxPreset() {
      return DropboxPreset.__super__.constructor.apply(this, arguments);
    }

    DropboxPreset.prototype.handle = function(root_dir, path_to_file, cb) {
      var basename, res, _ref;
      basename = path.basename(path.join(root_dir, path_to_file));
      res = constants.ignore_res.NONE;
      if ((_ref = basename.toLowerCase()) === '.dropbox' || _ref === '.dropbox.attr' || _ref === '.dropbox.cache' || _ref === 'desktop.ini' || _ref === 'thumbs.db' || _ref === '.ds_store' || _ref === 'ds_store' || _ref === 'icon\r') {
        res = constants.ignore_res.IGNORE;
      } else if (basename.match(/^(\~\$.*)|(\.\~.*)|(\~.*\.tmp)$/gi)) {
        res = constants.ignore_res.IGNORE;
      }
      return cb(res);
    };

    return DropboxPreset;

  })(PresetBase);

  module.exports = DropboxPreset;

}).call(this);
