Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

File open/close.

Detailed Description

Cpfspd opens a file at its first access. When the application attempts to open more than 10 files simultaneously, the least recently used one is closed. At program termination, all open files are closed. Normally, this is all handled automatically and the application does not need to take action.

Only in specific cases, the following functions are required. These functions allow more detailed control over the open files.

The open file administration is kept inside the cpfspd library and is stored in global data. Therefore, multithreading applications need to take special precautions.

In a multi threading application one of the following two approaches must be followed: 1) First open all files in a single thread, then start threads to process the data from the opened files. More precise:

File open: specify the filename and a flag indicating write access. File close: if a filename is specified, only that file is closed (if it was open); if NULL is specified, all open files are closed.


pT_status p_open_file (const char *filename, int write)
pT_status p_close_file (const char *filename)

Function Documentation

pT_status p_open_file const char *  filename,
int  write

pT_status p_close_file const char *  filename  ) 

Generated on Thu Nov 19 16:28:20 2009 for cpfspd by  doxygen