xref: /aoo41x/main/sal/osl/unx/uunxapi.hxx (revision 565d668c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24  #ifndef _OSL_UUNXAPI_HXX_
25  #define _OSL_UUNXAPI_HXX_
26 
27  #ifndef _OSL_UUNXAPI_H_
28  #include "uunxapi.h"
29  #endif
30 
31  #ifndef _RTL_USTRING_HXX_
32  #include <rtl/ustring.hxx>
33  #endif
34 
35  namespace osl
36  {
37 
38 	 /***********************************
39 	  osl::access
40 
41 	  @see access
42 	  **********************************/
43 
access(const rtl::OUString & ustrPath,int mode)44 	 inline int access(const rtl::OUString& ustrPath, int mode)
45  	 {
46  		return access_u(ustrPath.pData, mode);
47   	 }
48 
49 	 /***********************************
50 	  osl::realpath
51 
52 	  @descr
53 	  The return value differs from the
54 	  realpath function
55 
56 	  @returns sal_True on success else
57 	  sal_False
58 
59 	  @see realpath
60 	  **********************************/
61 
realpath(const rtl::OUString & ustrFileName,rtl::OUString & ustrResolvedName)62 	 inline sal_Bool realpath(
63  		const rtl::OUString& ustrFileName,
64 		rtl::OUString& ustrResolvedName)
65 	 {
66  		return realpath_u(ustrFileName.pData, &ustrResolvedName.pData);
67  	 }
68 
69 
70 	 /***********************************
71 	  osl::lstat
72 
73 	  @see lstat
74 	  **********************************/
75 
lstat(const rtl::OUString & ustrPath,struct stat & buf)76 	  inline int lstat(const rtl::OUString& ustrPath, struct stat& buf)
77 	  {
78 	  	 return lstat_u(ustrPath.pData, &buf);
79 	  }
80 
81     /***********************************
82           osl::mkdir
83           @see mkdir
84           **********************************/
mkdir(const rtl::OUString & aPath,mode_t aMode)85     inline int mkdir(const rtl::OUString& aPath, mode_t aMode)
86     {
87         return mkdir_u(aPath.pData, aMode);
88     }
89 
90  } // end namespace osl
91 
92 
93  #endif /* _OSL_UUNXAPI_HXX_ */
94 
95