If any child is not up-to-date, then this directory isn't,
        either.
173346
def is_up_to_date(self):
        """"""
        if self.builder is not MkdirBuilder and not self.exists():
            return 0
        up_to_date = SCons.Node.up_to_date
        for kid in self.children():
            if kid.get_state() > up_to_date:
                return 0
        return 1
711953
def isdir(path, message):
    
    if not os.path.isdir(path):
        raise FileNotFoundError(
            errno.ENOENT,
            "{}: {}".format(message, os.strerror(errno.ENOENT)), path)
1346534
private void checkNotAncestor(File source, Directory destParent, FileSystemView destView)
      throws IOException {
    // if dest is not in the same file system, it couldn't be in source's subdirectories
    if (!isSameFileSystem(destView)) {
      return;
    }

    Directory current = destParent;
    while (true) {
      if (current.equals(source)) {
        throw new IOException(
            "invalid argument: can't move directory into a subdirectory of itself");
      }

      if (current.isRootDirectory()) {
        return;
      } else {
        current = current.parent();
      }
    }
  }
1041524
function isDirectory(filePath, callback) {
  try {
    fs.stat(filePath, function (err, data) {
      if (err) {
        callback(null, false);
      } else {
        callback(null, data.isDirectory());
      }
    });
  } catch (e) {
    callback(null, false);
  }
}
526031
def isDirty(self, CachableItem):
        """"""
        _cachedItem = self.get(CachableItem)
        if not _cachedItem:
            return True
        _newCacheItem = self.mapper.get(CachableItem)
        return False if _cachedItem == _newCacheItem else True
1292194
def is_up_to_date(outfile, basedatetime):
        # type: (AnyStr, datetime) -> bool
        """"""
        if os.path.exists(outfile):
            if os.path.getmtime(outfile) >= basedatetime:
                return True
        return False
343385
def is_subdirectory(potential_subdirectory, expected_parent_directory):
        

        def _get_normalized_parts(path):
            return DKCloudCommandRunner.os_path_split_asunder(os.path.realpath(os.path.abspath(os.path.normpath(path))))

        # make absolute and handle symbolic links, split into components
        sub_parts = _get_normalized_parts(potential_subdirectory)
        parent_parts = _get_normalized_parts(expected_parent_directory)

        if len(parent_parts) > len(sub_parts):
            # a parent directory never has more path segments than its child
            return False

        # we expect the zip to end with the short path, which we know to be the parent
        return all(part1 == part2 for part1, part2 in zip(sub_parts, parent_parts))
390371
private static boolean makeSureExists(File dir) {
        // Make sure the dest directories exist.
        if (!dir.exists()) {
            if (!dir.mkdirs()) {
                Log.error("Could not create the directory "+dir.getPath());
                return false;
            }
        }
        return true;
    }
403697
def is_dirty(self, index=True, working_tree=True, untracked_files=False,
                 submodules=True, path=None):
        
        if self._bare:
            # Bare repositories with no associated working directory are
            # always consired to be clean.
            return False

        # start from the one which is fastest to evaluate
        default_args = ['--abbrev=40', '--full-index', '--raw']
        if not submodules:
            default_args.append('--ignore-submodules')
        if path:
            default_args.append(path)
        if index:
            # diff index against HEAD
            if osp.isfile(self.index.path) and \
                    len(self.git.diff('--cached', *default_args)):
                return True
        # END index handling
        if working_tree:
            # diff index against working tree
            if len(self.git.diff(*default_args)):
                return True
        # END working tree handling
        if untracked_files:
            if len(self._get_untracked_files(path, ignore_submodules=not submodules)):
                return True
        # END untracked files
        return False
739532
def has_subdirectories(path, include, exclude, show_all):
    """"""
    try:
        # > 1 because of '..'
        return len( listdir(path, include, exclude,
                            show_all, folders_only=True) ) > 1
    except (IOError, OSError):
        return False
7004
def dir_exists(self):
        

        r = requests.request(self.method if self.method else 'HEAD', self.url, **self.storage_args)
        try: r.raise_for_status()
        except Exception: return False

        return True
432300
def isignored(self, relpath, directory=False):
    """"""
    relpath = self._relpath_no_dot(relpath)
    if directory:
      relpath = self._append_trailing_slash(relpath)
    return self.ignore.match_file(relpath)
930376
def is_multifile_object_without_children(self, location: str) -> bool:
        
        return isdir(location) and len(self.find_multifile_object_children(location)) == 0
1342242
def _check_dir(self, dirname):
        
        if not os.path.exists(dirname):
            print("Directory %s does not exist!" % dirname)
            sys.exit(1)
896179
def is_child(child_path, parent_path):
        
        parent_dir = os.path.join(parent_path, '')
        child_dir = os.path.join(child_path, '')
        return child_dir.startswith(parent_dir)
120136
protected static void checkDirectory(boolean generateSouceOnly, File sourceOutputDir) {
        if (generateSouceOnly) {
            if (sourceOutputDir == null) {
                throw new RuntimeException("param 'sourceOutputDir' is null.");
            }

            if (!sourceOutputDir.isDirectory()) {
                throw new RuntimeException("param 'sourceOutputDir' should be a exist file directory.");
            }
        }
    }
527224
def wasModified(self):
        
        self.filePath.restat()
        mtime = self.filePath.getmtime()
        if mtime >= self.lastModified:
            return True
        else:
            return False