mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Add pgreadlink() on Windows to read junction points
Add support for reading back information about the symbolic links we've created with pgsymlink(), which are actually Junction Points. Just like pgsymlink() can only create directory symlinks, pgreadlink() can only read directory symlinks.
This commit is contained in:
@@ -284,8 +284,11 @@ extern int pgunlink(const char *path);
|
||||
*/
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
extern int pgsymlink(const char *oldpath, const char *newpath);
|
||||
extern int pgreadlink(const char *path, char *buf, size_t size);
|
||||
extern bool pgwin32_is_junction(char *path);
|
||||
|
||||
#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
|
||||
#define readlink(path, buf, size) pgreadlink(path, buf, size)
|
||||
#endif
|
||||
|
||||
extern bool rmtree(const char *path, bool rmtopdir);
|
||||
|
Reference in New Issue
Block a user