//! \\?\D:\very long path
//! File I/O functions in the Windows API convert "/" to "\" as part of converting the name to an NT-style name, except when using the "\\?\" prefix.
//! @return true if extended-length NT path syntax detected.
- static Standard_Boolean IsNtExtendedPath (const char* thePath) { return ::memcmp (thePath, "\\\\?\\", 4) == 0; }
+ static Standard_Boolean IsNtExtendedPath (const char* thePath)
+ {
+ return ::strncmp (thePath, "\\\\?\\", 4) == 0;
+ }
//! UNC is a naming convention used primarily to specify and map network drives in Microsoft Windows.
//! Sample path:
//! @return true if UNC path syntax detected.
static Standard_Boolean IsUncPath (const char* thePath)
{
- if (::memcmp (thePath, "\\\\", 2) == 0)
+ if (::strncmp (thePath, "\\\\", 2) == 0)
{
return thePath[2] != '?'
|| IsUncExtendedPath (thePath);
}
- return ::memcmp (thePath, "//", 2) == 0;
+ return ::strncmp (thePath, "//", 2) == 0;
}
//! Detect extended-length UNC path.
//! Sample path:
//! \\?\UNC\server\share
//! @return true if extended-length UNC path syntax detected.
- static Standard_Boolean IsUncExtendedPath (const char* thePath) { return ::memcmp (thePath, "\\\\?\\UNC\\", 8) == 0; }
+ static Standard_Boolean IsUncExtendedPath (const char* thePath)
+ {
+ return ::strncmp (thePath, "\\\\?\\UNC\\", 8) == 0;
+ }
//! Detect absolute UNIX-path.
//! Sample path:
//! /media/cdrom/file
//! @return true if UNIX path syntax detected.
- static Standard_Boolean IsUnixPath (const char* thePath) { return thePath[0] == '/' && thePath[1] != '/'; }
+ static Standard_Boolean IsUnixPath (const char* thePath)
+ {
+ return thePath[0] == '/' && thePath[1] != '/';
+ }
//! Detect special URLs on Android platform.
//! Sample path:
//! content://filename
//! @return true if content path syntax detected
- static Standard_Boolean IsContentProtocolPath (const char* thePath) { return ::memcmp (thePath, "content://", 10) == 0; }
+ static Standard_Boolean IsContentProtocolPath (const char* thePath)
+ {
+ return ::strncmp (thePath, "content://", 10) == 0;
+ }
//! Detect remote protocol path (http / ftp / ...).
//! Actually shouldn't be remote...