Remove unused Path::canRead.

llvm-svn: 184229
This commit is contained in:
Rafael Espindola 2013-06-18 20:42:25 +00:00
parent 7d6c625235
commit 3025f2366f
3 changed files with 0 additions and 21 deletions

View File

@ -267,15 +267,6 @@ namespace sys {
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
/// the existence and readability (by the current program) of the file
/// or directory.
/// @returns true if the pathname references a readable file.
/// @brief Determines if the path is a readable file or directory
/// in the file system.
bool canRead() const;
/// This function determines if the path name references a writable file
/// or directory in the file system. This function checks for the
/// existence and writability (by the current program) of the file or

View File

@ -325,11 +325,6 @@ Path::isSymLink() const {
}
bool
Path::canRead() const {
return 0 == access(path.c_str(), R_OK);
}
bool
Path::canWrite() const {
return 0 == access(path.c_str(), W_OK);

View File

@ -243,13 +243,6 @@ Path::isSymLink() const {
return attributes & FILE_ATTRIBUTE_REPARSE_POINT;
}
bool
Path::canRead() const {
// FIXME: take security attributes into account.
DWORD attr = GetFileAttributes(path.c_str());
return attr != INVALID_FILE_ATTRIBUTES;
}
bool
Path::canWrite() const {
// FIXME: take security attributes into account.