MCPcopy Create free account
hub / github.com/apache/cloudberry / _tarWriteDir

Function _tarWriteDir

src/backend/replication/basebackup.c:2074–2087  ·  view source on GitHub ↗

* Write tar header for a directory. If the entry in statbuf is a link then * write it as a directory anyway. */

Source from the content-addressed store, hash-verified

2072 * write it as a directory anyway.
2073 */
2074static int64
2075_tarWriteDir(const char *pathbuf, int basepathlen, struct stat *statbuf,
2076 bool sizeonly)
2077{
2078 /* If symlink, write it as a directory anyway */
2079#ifndef WIN32
2080 if (S_ISLNK(statbuf->st_mode))
2081#else
2082 if (pgwin32_is_junction(pathbuf))
2083#endif
2084 statbuf->st_mode = S_IFDIR | pg_dir_create_mode;
2085
2086 return _tarWriteHeader(pathbuf + basepathlen + 1, NULL, statbuf, sizeonly);
2087}
2088
2089/*
2090 * Increment the network transfer counter by the given number of bytes,

Callers 1

sendDirFunction · 0.85

Calls 2

pgwin32_is_junctionFunction · 0.85
_tarWriteHeaderFunction · 0.70

Tested by

no test coverage detected