Design Pattern Examples
Overview of object-oriented design patterns
c/Composite_FileAccess.h File Reference

Declaration of the Composite_FileAccess_GetEntry() function used in the Composite Pattern. More...

Include dependency graph for c/Composite_FileAccess.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __COMPOSITE_FILEACCESS_H__
 

Functions

FileDirEntryComposite_FileAccess_GetEntry (const char *path)
 Return a FileDirEntry object representing the specified file "path" from an internal list of data entries that is organized in a file/ directory structure.
 

Detailed Description

Declaration of the Composite_FileAccess_GetEntry() function used in the Composite Pattern.

Definition in file c/Composite_FileAccess.h.

Macro Definition Documentation

◆ __COMPOSITE_FILEACCESS_H__

#define __COMPOSITE_FILEACCESS_H__

Definition at line 8 of file c/Composite_FileAccess.h.

Function Documentation

◆ Composite_FileAccess_GetEntry()

FileDirEntry * Composite_FileAccess_GetEntry ( const char *  path)

Return a FileDirEntry object representing the specified file "path" from an internal list of data entries that is organized in a file/ directory structure.

Parameters
pathA "path" specifying the entry to find, with each component separated by '/'.
Returns
Returns a FileDirEntry object representing the specified file entry. Returns NULL if no entry could be found.

Definition at line 287 of file Composite_FileAccess.c.

References _FindEntry(), replace_chr(), and STRDUP.

Referenced by Composite_Exercise().