Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 6: [PATCH 06/17] feat(wallet): preserve Roots signing and spend controls on v31

src/util/fs_helpers.h

Before: src/util/fs_helpers.h · After: src/util/fs_helpers.h

File metadata
index d39ae115c7c19cfed40f8295b22bbc6720d33f50..009f9a8ed6e6d46628ead2121917fb35b90a6644 100644

Download original patch · Release notes

Diff rows 1–23 of 23. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/util/fs_helpers.h CHANGED
@@ -93,8 +93,23 @@ std::string PermsToSymbolicString(fs::perms p);
93
93
  */
94
94
  std::optional<fs::perms> InterpretPermString(const std::string& s);
95
95
 
96
+ /** Check if a directory is writable by creating a temporary file on it.
97
+ *
98
+ * @param[in] dir_path Path of the directory to test
99
+ * @return true if a temporary file could be created and removed, false otherwise.
100
+ * @throw std::runtime_error if dir_path is not a directory.
101
+ */
102
+ bool IsDirWritable(const fs::path& dir_path);
103
+
96
104
  #ifdef WIN32
97
105
  fs::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
98
106
  #endif
99
107
 
108
+ /** Determine whether the given path is a symbolic link or a reparse point on windows
109
+ *
110
+ * @param[in] path The path to check
111
+ * @return Whether path is a symlink or reparse point
112
+ */
113
+ bool IsSymlink(const fs::path& path);
114
+
100
115
  #endif // BITCOIN_UTIL_FS_HELPERS_H