MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / caseInsensitiveFilesystem

Function caseInsensitiveFilesystem

lib/path.cpp:58–69  ·  view source on GitHub ↗

Is the filesystem case insensitive? */

Source from the content-addressed store, hash-verified

56
57/** Is the filesystem case insensitive? */
58static constexpr bool caseInsensitiveFilesystem()
59{
60#if defined(_WIN32) || (defined(__APPLE__) && defined(__MACH__))
61 // Windows is case insensitive
62 // MacOS is case insensitive by default (also supports case sensitivity)
63 return true;
64#else
65 // TODO: Non-windows filesystems might be case insensitive
66 // needs to be determined per filesystem and location - e.g. /sys/fs/ext4/features/casefold
67 return false;
68#endif
69}
70
71std::string Path::toNativeSeparators(std::string path)
72{

Callers 3

sameFileNameMethod · 0.85
getFilenameExtensionMethod · 0.85
identifyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected