mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Support/Path: Deprecate PathV1::IsSymlink and replace all uses with PathV2::is_symlink.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123345 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
25dc2268a5
commit
9df536ca78
@ -394,7 +394,8 @@ namespace sys {
|
||||
/// existing symbolic link.
|
||||
/// @returns true if the pathname references an existing symlink.
|
||||
/// @brief Determines if the path is a symlink in the file system.
|
||||
bool isSymLink() const;
|
||||
LLVM_ATTRIBUTE_DEPRECATED(bool isSymLink() const,
|
||||
LLVM_PATH_DEPRECATED_MSG(fs::is_symlink));
|
||||
|
||||
/// This function determines if the path name references a readable file
|
||||
/// or directory in the file system. This function checks for
|
||||
|
@ -660,6 +660,14 @@ bool is_symlink(file_status status) {
|
||||
return status.type() == file_type::symlink_file;
|
||||
}
|
||||
|
||||
error_code is_symlink(const Twine &path, bool &result) {
|
||||
file_status st;
|
||||
if (error_code ec = status(path, st))
|
||||
return ec;
|
||||
result = is_symlink(st);
|
||||
return success;
|
||||
}
|
||||
|
||||
bool is_other(file_status status) {
|
||||
return exists(status) &&
|
||||
!is_regular_file(status) &&
|
||||
|
Loading…
Reference in New Issue
Block a user