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