Index: trunk/include/iprt/dir.h
===================================================================
--- trunk/include/iprt/dir.h	(revision 46004)
+++ trunk/include/iprt/dir.h	(revision 46008)
@@ -273,6 +273,6 @@
      * systems (or Unixes) stores the type of a directory entry and instead
      * expects the user to use stat() to get it.  So, when you see this you
-     * should use RTPathQueryInfo to get the type, or if if you're lazy, use
-     * RTDirReadEx. */
+     * should use RTDirQueryUnknownType or RTDirQueryUnknownTypeEx to get the type,
+     * or if if you're lazy, use RTDirReadEx. */
     RTDIRENTRYTYPE  enmType;
     /** The length of the filename, excluding the terminating nul character. */
@@ -285,4 +285,6 @@
 /** Pointer to a directory entry. */
 typedef RTDIRENTRY *PRTDIRENTRY;
+/** Pointer to a const directory entry. */
+typedef RTDIRENTRY const *PCRTDIRENTRY;
 
 
@@ -314,4 +316,6 @@
 /** Pointer to a directory entry. */
 typedef RTDIRENTRYEX *PRTDIRENTRYEX;
+/** Pointer to a const directory entry. */
+typedef RTDIRENTRYEX const *PCRTDIRENTRYEX;
 
 
@@ -410,4 +414,50 @@
 RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs, uint32_t fFlags);
 
+/**
+ * Resolves RTDIRENTRYTYPE_UNKNOWN values returned by RTDirRead.
+ *
+ * @returns IPRT status code (see RTPathQueryInfo).
+ * @param   pszComposedName The path to the directory entry. The caller must
+ *                          compose this, it's NOT sufficient to pass
+ *                          RTDIRENTRY::szName!
+ * @param   penmType        Pointer to the RTDIRENTRY::enmType member.  If this
+ *                          is not RTDIRENTRYTYPE_UNKNOWN, the function will
+ *                          return immediately without doing anything.  If it
+ *                          is, it will use RTPathQueryInfo to try figure out
+ *                          the correct value.  On failure, this will be
+ *                          unchanged.
+ */
+RTDECL(int) RTDirQueryUnknownType(const char *pszComposedName, RTDIRENTRYTYPE *penmType);
+
+/**
+ * Resolves RTDIRENTRYTYPE_UNKNOWN values returned by RTDirRead, extended
+ * version.
+ *
+ * @returns IPRT status code (see RTPathQueryInfo).
+ * @param   pszComposedName The path to the directory entry. The caller must
+ *                          compose this, it's NOT sufficient to pass
+ *                          RTDIRENTRY::szName!
+ * @param   penmType        Pointer to the RTDIRENTRY::enmType member or
+ *                          similar.  Will NOT be checked on input.
+ * @param   pObjInfo        The object info buffer to use with RTPathQueryInfo.
+ */
+RTDECL(int) RTDirQueryUnknownTypeEx(const char *pszComposedName, RTDIRENTRYTYPE *penmType, PRTFSOBJINFO pObjInfo);
+
+/**
+ * Checks if the directory entry returned by RTDirRead is '.', '..' or similar.
+ *
+ * @returns true / false.
+ * @param   pDirEntry       The directory entry to check.
+ */
+RTDECL(bool) RTDirEntryIsStdDotLink(PRTDIRENTRY pDirEntry);
+
+/**
+ * Checks if the directory entry returned by RTDirReadEx is '.', '..' or
+ * similar.
+ *
+ * @returns true / false.
+ * @param   pDirEntryEx     The extended directory entry to check.
+ */
+RTDECL(bool) RTDirEntryExIsStdDotLink(PCRTDIRENTRYEX pDirEntryEx);
 
 /**
Index: trunk/include/iprt/mangling.h
===================================================================
--- trunk/include/iprt/mangling.h	(revision 46004)
+++ trunk/include/iprt/mangling.h	(revision 46008)
@@ -426,4 +426,6 @@
 # define RTDirCreateTempSecure                          RT_MANGLER(RTDirCreateTempSecure)
 # define RTDirCreateUniqueNumbered                      RT_MANGLER(RTDirCreateUniqueNumbered)
+# define RTDirEntryIsStdDotLink                         RT_MANGLER(RTDirEntryIsStdDotLink)
+# define RTDirEntryExIsStdDotLink                       RT_MANGLER(RTDirEntryExIsStdDotLink)
 # define RTDirExists                                    RT_MANGLER(RTDirExists)
 # define RTDirFlush                                     RT_MANGLER(RTDirFlush)
@@ -432,4 +434,6 @@
 # define RTDirOpenFiltered                              RT_MANGLER(RTDirOpenFiltered)
 # define RTDirQueryInfo                                 RT_MANGLER(RTDirQueryInfo)
+# define RTDirQueryUnknownType                          RT_MANGLER(RTDirQueryUnknownType)
+# define RTDirQueryUnknownTypeEx                        RT_MANGLER(RTDirQueryUnknownTypeEx)
 # define RTDirRead                                      RT_MANGLER(RTDirRead)
 # define RTDirReadEx                                    RT_MANGLER(RTDirReadEx)
