dir : -1 ,+1 skip disabled items
545232
function (index, dir) {
            var children = this.get('children'), len = children.length, o = index;
            do {
                var c = children[index];
                if (!c.get('disabled') && c.get('visible') !== false) {
                    return children[index];
                }
                index = (index + dir + len) % len;
            } while (index !== o);
            return undefined;
        }
828292
function removeDir(dirPath, cleanOnly) {
  var files;

  try {
    files = fs.readdirSync(dirPath);
  } catch(e) {
    return;
  }

  if (files.length > 0) {
    for (var i = 0; i < files.length; i++) {
      var filePath = path.join(dirPath, files[i]);
      if (fs.statSync(filePath).isFile())
        fs.unlinkSync(filePath);
      else
        rmDir(filePath);
    }
  }

  !cleanOnly && fs.rmdirSync(dirPath);
}
1228852
def clear_input(self):
        """"""
        for item in listdir(self.input_dir):
            item_path = path.join(self.input_dir, item)
            if path.isfile(item_path):
                remove(item_path)
                logger.debug('Removed input %s.' % item_path)
        return
540798
function _deleteDir(path) {
  if (fs.existsSync(path)) {
    var subpaths = fs.readdirSync(path);
    subpaths.forEach(function(subpath) {
      var curPath = path + '/' + subpath;
      if (fs.lstatSync(curPath).isDirectory()) {
        _deleteDir(curPath);
      } else {
        fs.unlinkSync(curPath);
      }
    });
    fs.rmdirSync(path);
  }
}
61754
def get_archives_to_prune(archives, hook_data):
    """"""
    files_to_skip = []
    for i in ['current_archive_filename', 'old_archive_filename']:
        if hook_data.get(i):
            files_to_skip.append(hook_data[i])
    archives.sort(key=itemgetter('LastModified'),
                  reverse=False)  # sort from oldest to newest
    # Drop all but last 15 files
    return [i['Key'] for i in archives[:-15] if i['Key'] not in files_to_skip]
230475
def shall_skip(module, opts):
    # type: (unicode, Any) -> bool
    """"""
    # skip if the file doesn't exist and not using implicit namespaces
    if not opts.implicit_namespaces and not path.exists(module):
        return True

    # skip it if there is nothing (or just \n or \r\n) in the file
    if path.exists(module) and path.getsize(module) <= 2:
        return True

    # skip if it has a "private" name and this is selected
    filename = path.basename(module)
    if filename != '__init__.py' and filename.startswith('_') and \
       not opts.includeprivate:
        return True
    return False
89747
function excludeFiles(list, regex) {
        var ret = [];
        for (var i=0; i < list.length; i++) {
            if (!regex.test(list[i].dst)) {
                ret.push(list[i]);
            }
        }
        return ret;
    }
519983
private void skipHeaders(int flag) {
		// trying to skip optional gzip file members if any is present
		if ((flag & FEXTRA) != 0) {
			skipExtra(flag);
		} else if ((flag & FNAME) != 0) {
			skipTerminatorByte(flag, FNAME);
		} else if ((flag & FCOMMENT) != 0) {
			skipTerminatorByte(flag, FCOMMENT);
		} else if ((flag & FHCRC) != 0) {
			skipCRC16(flag);
		}
	}
490373
def _skip_remove(self):
        
        if "--checklist" not in self.extra:
            self.msg.template(78)
            print("| Insert packages to exception remove:")
            self.msg.template(78)
            try:
                self.skip = raw_input(" > ").split()
            except EOFError:
                print("")
                raise SystemExit()
        for s in self.skip:
            if s in self.removed:
                self.removed.remove(s)
343321
function _emptyDirectoryProm (directory) {

			return new Promise((resolve, reject) => {

				readdir(directory, (err, files) => {
					return err ? reject(err) : resolve(files);
				});

			}).then((files) => {

				const result = [];

					for (let i = 0; i < files.length; ++i) {
						result.push(join(directory, files[i]));
					}

				return Promise.resolve(result);

			}).then((files) => {
				return files.length ? _removeDirectoryContentProm(files) : Promise.resolve();
			});

		}
325550
def include_none?(*items)
      items = items.first if items.length == 1 && items.first.kind_of?(Array)
      (self & items).empty?
    end
615666
def remove_blank_dirs(self):
        """"""
        if self.is_blank():
            try:
                os.rmdir(self.path)
            except OSError as e:
                print(e)
        else:
            remove_empty_dir(self.path)
1006139
def __skip_this(self, level):
        
        skip = False
        if self.exclude_paths and level.path() in self.exclude_paths:
            skip = True
        elif self.exclude_regex_paths and any(
                [exclude_regex_path.search(level.path()) for exclude_regex_path in self.exclude_regex_paths]):
            skip = True
        else:
            if self.exclude_types_tuple and (isinstance(level.t1, self.exclude_types_tuple) or
                                             isinstance(level.t2, self.exclude_types_tuple)):
                skip = True

        return skip
1314161
def set_skips(self, skips):
        """"""
        skips.sort()
        internal_assert(lambda: len(set(skips)) == len(skips), "duplicate line skip(s) in skips", skips)
        self.skips = skips
1331845
def normalize_directory(path):
    
    if path is None:
        return None
    if path.endswith(os.path.sep):
        return path
    else:
        return path + os.path.sep
435159
def _skip_to_blank(f, spacegroup, setting):
    """"""
    while True:
        line = f.readline()
        if not line:
            raise SpacegroupNotFoundError(
                'invalid spacegroup %s, setting %i not found in data base' % 
                ( spacegroup, setting ) )
        if not line.strip():
            break
229190
def items_lower(self):
        '''
        
        '''
        return ((key, val[1]) for key, val in six.iteritems(self._data))