[Libreoffice-commits] .: tools/source

François Tigeot ftigeot at kemper.freedesktop.org
Wed Jun 15 12:03:28 PDT 2011


 tools/source/fsys/dirent.cxx |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

New commits:
commit 9d84fcc893b55709cea2cf418c8e60bd9961146a
Author: Francois Tigeot <ftigeot at wolfpond.org>
Date:   Wed Jun 15 21:01:16 2011 +0200

    Revert part of previous commit

diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 83b3ebd..fd22a37 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -1842,6 +1842,31 @@ FSysError DirEntry::ImpParseUnixName( const ByteString& rPfad, FSysPathStyle eSt
     return FSYS_ERR_OK;
 }
 
+ErrCode CreateEntry_Impl( const DirEntry &rPath, DirEntryKind eKind )
+{
+    // versuchen, anzulegen (ausser bei FSYS_KIND_ALL)
+    ErrCode eErr = ERRCODE_NONE;
+    if ( FSYS_KIND_FILE == eKind )
+    {
+        SvFileStream aStream( rPath.GetFull(), STREAM_STD_WRITE );
+        aStream.WriteLine( "" );
+        eErr = aStream.GetError();
+    }
+    else if ( FSYS_KIND_ALL != eKind )
+        eErr = rPath.MakeDir() ? ERRCODE_NONE : ERRCODE_IO_UNKNOWN;
+
+    // erfolgreich?
+    if ( !rPath.Exists() )
+        eErr = ERRCODE_IO_UNKNOWN; // Doch was schiefgegangen ?
+
+    // ggf. wieder l"oschen
+    if ( FSYS_KIND_NONE == eKind )
+        rPath.Kill();
+
+    // Fehlercode zur?ckliefern
+    return eErr;
+}
+
 sal_Bool IsValidEntry_Impl( const DirEntry &rPath,
                         const String &rLongName,
                         DirEntryKind eKind,


More information about the Libreoffice-commits mailing list