Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

bool Common::FSNode::operator< ( const FSNode node  )  const

Compare the name of this node to the name of another. Directories go before normal files.

Definition at line 51 of file fs.cpp.

References Common::String::compareToIgnoreCase(), getDisplayName(), and isDirectory().

      // Directories come before files, i.e., are "lower".
      if (isDirectory() != node.isDirectory())
            return isDirectory();

      // If both nodes are of the same type (two files or two dirs),
      // then sort by name, ignoring case.
      return getDisplayName().compareToIgnoreCase(node.getDisplayName()) < 0;

Generated by  Doxygen 1.6.0   Back to index