MCPcopy Create free account
hub / github.com/git/git / is_directory

Function is_directory

abspath.c:10–14  ·  view source on GitHub ↗

* Do not use this for inspecting *tracked* content. When path is a * symlink to a directory, we do not want to say it is a directory when * dealing with tracked content in the working tree. */

Source from the content-addressed store, hash-verified

8 * dealing with tracked content in the working tree.
9 */
10int is_directory(const char *path)
11{
12 struct stat st;
13 return (!stat(path, &st) && S_ISDIR(st.st_mode));
14}
15
16/* removes the last path component from 'path' except if 'path' is root */
17static void strip_last_component(struct strbuf *path)

Callers 15

git_setup_gettextFunction · 0.85
is_submodule_modifiedFunction · 0.85
validate_worktreeFunction · 0.85
repair_gitfileFunction · 0.85
infer_backlinkFunction · 0.85
should_prune_worktreeFunction · 0.85
sequencer_skipFunction · 0.85
treat_leading_pathFunction · 0.85
is_rerere_enabledFunction · 0.85

Calls 1

statClass · 0.70

Tested by

no test coverage detected