forked from shawwwn/H2OExtractor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
187 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,4 +94,6 @@ packages/ | |
*.dep | ||
*.pch | ||
*.ncb | ||
*.exp | ||
*.exp | ||
|
||
[Ss]ample/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* FileUtils.cpp */ | ||
#include "FileUtils.h" | ||
|
||
PathType checkPathType(const char* dirPath) | ||
{ | ||
if (access(dirPath, 0)==0) | ||
{ | ||
struct stat status; | ||
stat(dirPath, &status); | ||
if ( status.st_mode & S_IFDIR ) | ||
return TYPE_DIR; | ||
else | ||
return TYPE_FILE; | ||
} | ||
return TYPE_NOT_EXIST; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* FileUtils.h */ | ||
#pragma once | ||
|
||
#include <io.h> // For access() | ||
#include <sys/types.h> // For stat() | ||
#include <sys/stat.h> // For stat() | ||
#include "Types.h" | ||
|
||
enum PathType { TYPE_DIR, TYPE_FILE, TYPE_NOT_EXIST }; | ||
PathType checkPathType(const char* dirPath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* StringUtils.cpp */ | ||
#include "StringUtils.h" | ||
|
||
// TODO: Use native char array | ||
|
||
void getFileName(uint32_t index, const char* postfix, char* outputBuffer) | ||
{ | ||
memset(outputBuffer, 0, 16); | ||
char szIndex[8]; | ||
itoa (index, szIndex, 10); | ||
strcpy(outputBuffer, szIndex); | ||
strcat(outputBuffer, postfix); | ||
} | ||
|
||
void getFullPath(const char* directoryPath, char* fileName, char* outputBuffer) | ||
{ | ||
memset(outputBuffer, 0, 64); | ||
strcpy(outputBuffer, directoryPath); | ||
strcat(outputBuffer, fileName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* StringUtils.h */ | ||
#pragma once | ||
|
||
#include <string.h> | ||
#include <stdlib.h> | ||
#include "Types.h" | ||
|
||
void getFileName(uint32_t index, const char* postfix, char* outputBuffer); | ||
void getFullPath(const char* directoryPath, char* fileName, char* outputBuffer); |