docs: function chmod(file, permissions, options) {
    if (!isPlatform('unix')) return;
    if (!exists(file)) throw new Error(`Path '${file}' does not exists`);
    const isDir = isDirectory(file);
  
    options = _.sanitize(options, {recursive: false});
    let filePermissions = null;
    let dirPermissions = null;
    if (_.isReallyObject(permissions)) {
      filePermissions = permissions.file || null;
      dirPermissions = permissions.directory || null;
    } else {
      filePermissions = permissions;
      dirPermissions = permissions;
    }
  
    if (isDir && options.recursive) {
      _.each(listDirContents(file, {compact: false, includeTopDir: true}), function(data) {
        _chmod(data.file, data.type === 'directory' ? dirPermissions : filePermissions);
      });
    } else {
      _chmod(file, isDir ? dirPermissions : filePermissions);
    }
  }