Index: /trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h	(revision 71871)
+++ /trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h	(revision 71872)
@@ -646,4 +646,9 @@
     /** @}  */
 
+    /** @name helper functions to work with IPRT stuff.
+     * @{ */
+    RTFMODE GetFileMode(void) const;
+    /** @}  */
+
     int64_t              mAccessTime;
     int64_t              mAllocatedSize;
Index: /trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp	(revision 71871)
+++ /trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp	(revision 71872)
@@ -201,4 +201,37 @@
 }
 
+/**
+ * Returns the IPRT-compatible file mode.
+ * Note: Only handling RTFS_TYPE_ flags are implemented for now.
+ *
+ * @return IPRT file mode.
+ */
+RTFMODE GuestFsObjData::GetFileMode(void) const
+{
+    RTFMODE fMode = 0;
+
+    switch (mType)
+    {
+        case FsObjType_Directory:
+            fMode |= RTFS_TYPE_DIRECTORY;
+            break;
+
+        case FsObjType_File:
+            fMode |= RTFS_TYPE_FILE;
+            break;
+
+        case FsObjType_Symlink:
+            fMode |= RTFS_TYPE_SYMLINK;
+            break;
+
+        default:
+            break;
+    }
+
+    /** @todo Implement more stuff. */
+
+    return fMode;
+}
+
 ///////////////////////////////////////////////////////////////////////////////
 
