1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
{
31 /******************************************************************************/
33 /* Helper functions */
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
);
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
,
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
,
79 // This function implements the global exception handler of the file_ucp;
82 extern void throw_handler( sal_Int32 errorCode
,
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
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */