XBinder  Version 2.6.x
rtxFile.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2018 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
28 #ifndef _RTXFILE_H_
29 #define _RTXFILE_H_
30 
31 #include "rtxsrc/rtxContext.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
44 EXTERNRT OSBOOL rtxFileExists (const char* filePath);
45 
54 EXTERNRT OSBOOL rtxFileIsDirectory (const char* filePath);
55 
60 EXTERNRT time_t rtxFileLastModified( const char* filePath );
61 
74 EXTERNRT int rtxFileOpen
75 (FILE** ppFile, const char* filePath, const char* access);
76 
92 EXTERNRT int rtxFileReadBinary
93 (OSCTXT* pctxt, const char* filePath, OSOCTET** ppMsgBuf, size_t* pLength);
94 
110 EXTERNRT int rtxFileReadBinary2
111 (OSCTXT* pctxt, FILE* pFile, OSOCTET** ppMsgBuf, size_t* pLength);
112 
128 EXTERNRT int rtxFileReadBinToSysMem
129 (OSCTXT* pctxt, const char* filePath, OSOCTET** ppMsgBuf, size_t* pLength);
130 
149 EXTERNRT int rtxFileReadText
150 (OSCTXT* pctxt, const char* filePath, OSOCTET** ppMsgBuf, size_t* pLength);
151 
162 EXTERNRT int rtxFileWriteBinary
163 (const char* filePath, const OSOCTET* pMsgBuf, size_t length);
164 
176 EXTERNRT int rtxFileWriteText
177 (const char* filePath, const char* pMsgBuf);
178 
189 EXTERNRT int rtxFileCopyTextFile
190 (const char* srcFilePath, const char* destFilePath);
191 
192 #ifdef __cplusplus
193 }
194 #endif
195 
196 #endif
EXTERNRT int rtxFileCopyTextFile(const char *srcFilePath, const char *destFilePath)
This function copies the contents on one text file to another.
EXTERNRT int rtxFileReadBinary(OSCTXT *pctxt, const char *filePath, OSOCTET **ppMsgBuf, size_t *pLength)
This function reads the entire contents of a binary file into memory.
EXTERNRT int rtxFileWriteBinary(const char *filePath, const OSOCTET *pMsgBuf, size_t length)
This function writes binary data from memory to the given file.
EXTERNRT OSBOOL rtxFileExists(const char *filePath)
This function tests if a file exists.
Common run-time context definitions.
EXTERNRT OSBOOL rtxFileIsDirectory(const char *filePath)
This function tests if a file is actually a directory.
EXTERNRT int rtxFileReadBinary2(OSCTXT *pctxt, FILE *pFile, OSOCTET **ppMsgBuf, size_t *pLength)
This function reads the entire contents of a binary file into memory.
EXTERNRT int rtxFileOpen(FILE **ppFile, const char *filePath, const char *access)
This function opens a file for read, write, or append access.
EXTERNRT time_t rtxFileLastModified(const char *filePath)
This function returns the last modified time for a given file.
EXTERNRT int rtxFileReadText(OSCTXT *pctxt, const char *filePath, OSOCTET **ppMsgBuf, size_t *pLength)
This function reads the entire contents of an ASCII text file into memory.
EXTERNRT int rtxFileWriteText(const char *filePath, const char *pMsgBuf)
This function writes text data from memory to the given file.
EXTERNRT int rtxFileReadBinToSysMem(OSCTXT *pctxt, const char *filePath, OSOCTET **ppMsgBuf, size_t *pLength)
This function reads the entire contents of a binary file into memory.
Run-time context structure.
Definition: rtxContext.h:185