Update ooo320-m1
[ooovba.git] / sal / osl / os2 / path_helper.h
blob5986d7c7b481fd3c525735c523f0ff48d47f986d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: path_helper.h,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _PATH_HELPER_H_
32 #define _PATH_HELPER_H_
34 #include <sal/types.h>
35 #include <rtl/ustring.h>
36 #include <osl/file.h>
38 #ifdef __cplusplus
39 extern "C"
41 #endif
43 /*******************************************************************
44 osl_systemPathEnsureSeparator
45 Adds a trailing path separator to the given system path if not
46 already there and if the path is not the root path or a logical
47 drive alone
48 ******************************************************************/
50 void osl_systemPathEnsureSeparator(/*inout*/ rtl_uString** ppustrPath);
52 /*******************************************************************
53 osl_systemPathRemoveSeparator
54 Removes the last separator from the given system path if any and
55 if the path is not the root path '\'
56 ******************************************************************/
58 void SAL_CALL osl_systemPathRemoveSeparator(/*inout*/ rtl_uString** ppustrPath);
60 /*******************************************************************
61 osl_is_logical_drive_pattern
62 Returns whether a given path is only a logical drive pattern or not.
63 A logical drive pattern is something like "a:\", "c:\".
64 No logical drive pattern is something like "c:\test"
65 ******************************************************************/
67 sal_Int32 osl_systemPathIsLogicalDrivePattern(/*in*/ const rtl_uString* pustrPath);
69 #ifdef __cplusplus
71 #endif
73 #endif