docs: function(file, cb) {
                  if (!file) return cb();
  
                  readExtension(file, function(err, ext) {
                      // ignore errors from extension check
                      //if (err) console.error(err);
  
                      ext = ext || extname;
  
                      switch (ext.toLowerCase()) {
                      // Unzip and symlink to directory.
                      case '.zip':
                          if (nosymlink) {
                              unzip(file, function(err, file) {
                                  if (err) return cb(err);
                                  l.Datasource.file = file;
                                  return cb();
                              });
                          } else {
                              unzip(file, function(err, file_found) {
                                  if (err) return cb(err);
                                  l.Datasource.file = path.join(base,
                                                        'layers',
                                                        name,
                                                        path.basename(file_found));
                                  return utils.processFiles(file_found,
                                                          l.Datasource.file,
                                                          file_linking_method,
                                                          {cache:cache}, cb);
                              });
                          }
                          break;
                      case '.shp':
                          if (nosymlink) {
                              l.Datasource.file = file;
                              return cb();
                          } else {
                              l.Datasource.file =
                                  path.join(base, 'layers', name, path.basename(file));
                              return utils.processFiles(file, l.Datasource.file, file_linking_method, {cache:cache}, cb);
                          }
                          break;
                      default:
                          if (nosymlink) {
                              l.Datasource.file = file;
                              return cb();
                          } else {
                              l.Datasource.file =
                                  path.join(base, 'layers', name + ext);
                              return file_linking_method(file, l.Datasource.file, {cache:cache}, cb);
                          }
                          break;
                      }
                  });
              }