📄 type_gfile.html
字号:
<html><head><title>Generated Documentation</title></head><body> <image src="headerimage.png"> <br><br><table><tr><td><big><big><big style="font-family: arial;"><b>GFile</b></big></big></big><br><br></td><td>typedef secondsLater struct st_mtime; Contains some useful routines for manipulating files</td></tr></table><br><br><big><big><i>Statics (public)</i></big></big><br><div style="margin-left: 40px;">char* <big><b>ClipFilename</b></big>(char* szBuff)<br><div style="margin-left: 80px;"><font color=brown> This finds the last slash in szBuff and sets it to '\0' and returns szBuff.</font></div><br>char* <big><b>ClipPath</b></big>(const char* szBuff)<br><div style="margin-left: 80px;"><font color=brown> This finds the last slash in szBuff and returns a pointer to the char past that. (If there are no slashes or back-slashes, it returns szBuff)</font></div><br>void <big><b>CondensePath</b></big>(char* szPath)<br><div style="margin-left: 80px;"><font color=brown> Remove extra ".." folders in the path</font></div><br>bool <big><b>CpyFile</b></big>(const char* szSrcPath, const char* szDestPath)<br><div style="margin-left: 80px;"><font color=brown> This copies a file. It doesn't check to see if it is overwriting--it just does the copying. On success it returns true. On error it returns false. It won't work with a file bigger than 2GB. Both paths must include the filename.</font></div><br>bool <big><b>DoesDirExist</b></big>(const char* szDir)<br><div style="margin-left: 80px;"><font color=brown> returns true if the directory exists</font></div><br>bool <big><b>DoesFileExist</b></big>(const char* filename)<br><div style="margin-left: 80px;"><font color=brown> this just returns the file st_mstat -- or number of seconds since 1970 UTC returns true if the file exists</font></div><br>bool <big><b>GetGoodStorageDirectory</b></big>(char* toHere)<br><div style="margin-left: 80px;"><font color=brown> returns a user's home directory for the various os's</font></div><br>char* <big><b>LoadFileToBuffer</b></big>(const char* szFilename, int* pnSize)<br><div style="margin-left: 80px;"><font color=brown> Loads a file into memory and returns a pointer to the memory. You must delete the buffer it returns.</font></div><br>bool <big><b>MakeDir</b></big>(char* szDir)<br><div style="margin-left: 80px;"><font color=brown> This is a brute force way to make a directory. It i itterates through each subdir in szDir and calls mkdir until it has created the complete set of nested directories.</font></div><br>bool <big><b>ResetFileToBlank</b></big>(const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> turns a file into a blank file! returns true if successful</font></div><br>bool <big><b>SaveBufferToFile</b></big>(unsigned char* pBuf, int nSize, const char* szFilename)<br><div style="margin-left: 80px;"><font color=brown> Saves a buffer as a file. Returns true on success</font></div><br></div><br></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -