def classify(self, peer_dir_meta):
        """Classify this entry as 'new', 'unmodified', or 'modified'."""
        assert self.classification is None
        peer_entry_meta = None
        if peer_dir_meta:
            # Metadata is generally available, so we can detect 'new' or 'modified'
            peer_entry_meta = peer_dir_meta.get(self.name, False)

            if self.is_dir():
                # Directories are considered 'unmodified' (would require deep traversal
                # to check otherwise)
                if peer_entry_meta:
                    self.classification = "unmodified"
                else:
                    self.classification = "new"
            elif peer_entry_meta:
                # File entries can be classified as modified/unmodified
                self.ps_size = peer_entry_meta.get("s")
                self.ps_mtime = peer_entry_meta.get("m")
                self.ps_utime = peer_entry_meta.get("u")
                if (
                    self.size == self.ps_size
                    and FileEntry._eps_compare(self.mtime, self.ps_mtime) == 0
                ):
                    self.classification = "unmodified"
                else:
                    self.classification = "modified"
            else:
                # A new file entry
                self.classification = "new"
        else:
            # No metadata available:
            if self.is_dir():
                # Directories are considered 'unmodified' (would require deep traversal
                # to check otherwise)
                self.classification = "unmodified"
            else:
                # That's all we know, but EntryPair.classify() may adjust this
                self.classification = "existing"

        if PRINT_CLASSIFICATIONS:
            write("classify {}".format(self))
        assert self.classification in ENTRY_CLASSIFICATIONS
        return self.classification
Classify this entry as 'new', 'unmodified', or 'modified'.