LibreOffice Module ucb (master)  1
filglob.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_UCB_SOURCE_UCP_FILE_FILGLOB_HXX
20 #define INCLUDED_UCB_SOURCE_UCP_FILE_FILGLOB_HXX
21 
22 #include <rtl/ustring.hxx>
23 #include <osl/file.hxx>
24 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
25 
26 
27 namespace fileaccess {
28 
29  class BaseContent;
30 
31  /******************************************************************************/
32  /* */
33  /* Helper functions */
34  /* */
35  /******************************************************************************/
36 
37 
38  // Returns true if dstUnqPath is a child from srcUnqPath or both are equal
39 
40  extern bool isChild( const OUString& srcUnqPath,
41  const OUString& dstUnqPath );
42 
43 
44  // Changes the prefix in name
45  extern OUString newName( const OUString& aNewPrefix,
46  const OUString& aOldPrefix,
47  const OUString& old_Name );
48 
49  // returns the last part of the given url as title
50  extern OUString getTitle( const OUString& aPath );
51 
52  // returns the url without last part as parentname
53  // In case aFileName is root ( file:/// ) root is returned
54 
55  extern OUString getParentName( const OUString& aFileName );
56 
64  extern osl::FileBase::RC osl_File_copy( const OUString& strPath,
65  const OUString& strDestPath,
66  bool test );
67 
75  extern osl::FileBase::RC osl_File_move( const OUString& strPath,
76  const OUString& strDestPath,
77  bool test = false );
78 
79  // This function implements the global exception handler of the file_ucp;
80  // It never returns;
81 
82  extern void throw_handler( sal_Int32 errorCode,
83  sal_Int32 minorCode,
84  const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
85  const OUString& aUncPath,
86  BaseContent* pContent,
87  bool isHandled);
88  // the physical URL of the object
89 
90 } // end namespace fileaccess
91 
92 #endif
93 
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void throw_handler(sal_Int32 errorCode, sal_Int32 minorCode, const Reference< XCommandEnvironment > &xEnv, const OUString &aUncPath, BaseContent *pContent, bool isHandled)
Definition: filglob.cxx:232
bool isChild(const OUString &srcUnqPath, const OUString &dstUnqPath)
Definition: filglob.cxx:150
osl::FileBase::RC osl_File_move(const OUString &strPath, const OUString &strDestPath, bool test)
special move: On test = true, the implementation determines whether the destination exists and return...
Definition: filglob.cxx:218
OUString getTitle(const OUString &aPath)
Definition: filglob.cxx:181
OUString newName(const OUString &aNewPrefix, const OUString &aOldPrefix, const OUString &old_Name)
Definition: filglob.cxx:170
osl::FileBase::RC osl_File_copy(const OUString &strPath, const OUString &strDestPath, bool test)
special copy: On test = true, the implementation determines whether the destination exists and return...
Definition: filglob.cxx:203
OUString getParentName(const OUString &aFileName)
Definition: filglob.cxx:188