MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / IsDirectory

Method IsDirectory

PathCopyCopy/src/PluginUtils.cpp:80–85  ·  view source on GitHub ↗

Determines if the given path points to a directory or file. @param p_Path Path to check. @return true if path points to a directory.

Source from the content-addressed store, hash-verified

78 // @return true if path points to a directory.
79 //
80 bool PluginUtils::IsDirectory(const std::wstring& p_Path) noexcept
81 {
82 const DWORD attribs = ::GetFileAttributesW(p_Path.c_str());
83 return attribs != INVALID_FILE_ATTRIBUTES &&
84 (attribs & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY;
85 }
86
87 //
88 // Given a path to a file or folder, will return the path to its

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected