bump product version to 5.0.4.1
[LibreOffice.git] / ucb / source / ucp / file / filglob.hxx
blob2792e74b48e42c6f170b4fd5eab5e490f9311bcd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_UCB_SOURCE_UCP_FILE_FILGLOB_HXX
20 #define INCLUDED_UCB_SOURCE_UCP_FILE_FILGLOB_HXX
22 #include <rtl/ustring.hxx>
23 #include <osl/file.hxx>
24 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
27 namespace fileaccess {
29 class BaseContent;
31 /******************************************************************************/
32 /* */
33 /* Helper functions */
34 /* */
35 /******************************************************************************/
38 // Returns true if dstUnqPath is a child from srcUnqPath or both are equal
40 extern bool isChild( const OUString& srcUnqPath,
41 const OUString& dstUnqPath );
44 // Changes the prefix in name
45 extern OUString newName( const OUString& aNewPrefix,
46 const OUString& aOldPrefix,
47 const OUString& old_Name );
49 // returns the last part of the given url as title
50 extern OUString getTitle( const OUString& aPath );
52 // returns the url without last part as parentname
53 // In case aFileName is root ( file:/// ) root is returned
55 extern OUString getParentName( const OUString& aFileName );
57 /**
58 * special copy:
59 * On test = true, the implementation determines whether the
60 * destination exists and returns the appropriate errorcode E_EXIST.
61 * osl::File::copy copies unchecked.
64 extern osl::FileBase::RC osl_File_copy( const OUString& strPath,
65 const OUString& strDestPath,
66 bool test = false );
68 /**
69 * special move:
70 * On test = true, the implementation determines whether the
71 * destination exists and returns the appropriate errorcode E_EXIST.
72 * osl::File::move moves unchecked
75 extern osl::FileBase::RC osl_File_move( const OUString& strPath,
76 const OUString& strDestPath,
77 bool test = false );
79 // This function implements the global exception handler of the file_ucp;
80 // It never returns;
82 extern void throw_handler( sal_Int32 errorCode,
83 sal_Int32 minorCode,
84 const com::sun::star::uno::Reference<
85 com::sun::star::ucb::XCommandEnvironment >& xEnv,
86 const OUString& aUncPath,
87 BaseContent* pContent,
88 bool isHandled = false);
89 // the physical URL of the object
91 } // end namespace fileaccess
93 #endif
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */