Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi! I cleaned up your code for you! #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
30 changes: 15 additions & 15 deletions ofxiPhoneFile/ofxiPhoneFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,43 @@
class ofxiPhoneFile
{
public:

ofxiPhoneFile();

bool open(string fileName, int readWrite);
bool openFromData(string fileName, int readWrite);
bool openFromURL(string url);
bool open(string fileName, int fileLen, int readWrite); // if you are trying to read in a giagantic file all at once, you may need to use this function and increase fileLen
void close();

void close();

char * read();
char * readNextLine();
char * readNextLine();
char * readLine(int lineNum);

bool write(string data);

bool writeLine(string data);
bool commitLines(); // if you have been using writeLine, you must commit the lines to the file using this function.

NSString *filePath;

NSString * file;
NSArray *lines;

char * fileData;
char lineData[2000];
string writtenLines;

int maxFileLen;
int numLines;

bool verbose;

int IO;

private:

int lastLineRead;
};

Expand Down
Loading