FireBirdLib - Topfield TMS PVR TAP Programming Library
SeparatePathComponents.c
Go to the documentation of this file.
1#include <string.h>
2#include "libFireBird.h"
3
4void SeparatePathComponents(const char *FullName, char *Path, char *FileName, char *FileExt)
5{
7
8 int Index;
9 bool isDel;
10
11 if(Path) Path[0] = '\0';
12 if(FileName) FileName[0] = '\0';
13 if(FileExt) FileExt[0] = '\0';
14
15 if(!FullName || !*FullName)
16 {
17 TRACEEXIT();
18 return;
19 }
20
21 SeparateFileNameComponents(FullName, Path, FileName, FileExt, &Index, NULL, &isDel);
22
23 if(Index && FileName) TAP_SPrint(&FileName[strlen(FileName)], "-%d", Index);
24 if(isDel && FileExt) strcat(FileExt, ".del");
25
26 TRACEEXIT();
27}
void SeparateFileNameComponents(const char *FileName, char *Path, char *Name, char *Ext, int *Index, bool *isRec, bool *isDel)
void SeparatePathComponents(const char *FullName, char *Path, char *FileName, char *FileExt)
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243