summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/File.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/OSSupport/File.h')
-rw-r--r--src/OSSupport/File.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/OSSupport/File.h b/src/OSSupport/File.h
index ac6d1ab21..1b5e71a17 100644
--- a/src/OSSupport/File.h
+++ b/src/OSSupport/File.h
@@ -62,7 +62,7 @@ public:
{
fmRead, // Read-only. If the file doesn't exist, object will not be valid
fmWrite, // Write-only. If the file already exists, it will be overwritten
- fmReadWrite, // Read/write. If the file already exists, it will be left intact; writing will overwrite the data from the beginning
+ fmReadWrite, // Read / write. If the file already exists, it will be left intact; writing will overwrite the data from the beginning
fmAppend // Write-only. If the file already exists cursor will be moved to the end of the file
} ;
@@ -124,9 +124,30 @@ public:
/** Creates a new folder with the specified name. Returns true if successful. Path may be relative or absolute */
static bool CreateFolder(const AString & a_FolderPath);
- /** Returns the entire contents of the specified file as a string. Returns empty string on error. */
+ // tolua_end
+
+ /** Returns the entire contents of the specified file as a string. Returns empty string on error.
+ Exported manually in ManualBindings.cpp due to #1914 - ToLua code doesn't work well with binary files. */
static AString ReadWholeFile(const AString & a_FileName);
+ // tolua_begin
+
+ /** Returns a_FileName with its extension changed to a_NewExt.
+ a_FileName may contain path specification. */
+ static AString ChangeFileExt(const AString & a_FileName, const AString & a_NewExt);
+
+ /** Returns the last modification time (in current timezone) of the specified file.
+ The value returned is in the same units as the value returned by time() function.
+ If the file is not found / accessible, zero is returned. */
+ static unsigned GetLastModificationTime(const AString & a_FileName);
+
+ /** Returns the path separator used by the current platform.
+ Note that the platform / CRT may support additional path separators (such as slashes on Windows), these don't get reported. */
+ static AString GetPathSeparator(void);
+
+ /** Returns the customary executable extension used by the current platform. */
+ static AString GetExecutableExt(void);
+
// tolua_end
/** Returns the list of all items in the specified folder (files, folders, nix pipes, whatever's there). */