32 #ifndef _INCLUDE_SOURCEMOD_LIBRARY_INTERFACE_SYS_H_
33 #define _INCLUDE_SOURCEMOD_LIBRARY_INTERFACE_SYS_H_
45 #define SMINTERFACE_LIBRARYSYS_NAME "ILibrarySys"
46 #define SMINTERFACE_LIBRARYSYS_VERSION 5
50 FileTime_LastAccess = 0,
52 FileTime_LastChange = 2,
128 return SMINTERFACE_LIBRARYSYS_NAME;
132 return SMINTERFACE_LIBRARYSYS_VERSION;
196 virtual size_t PathFormat(
char *buffer,
size_t maxlength,
const char *pathfmt, ...) =0;
225 virtual bool FileTime(
const char *path, FileTimeType type, time_t *pTime) =0;
235 virtual size_t GetFileFromPath(
char *buffer,
size_t maxlength,
const char *path) =0;
239 #endif //_INCLUDE_SOURCEMOD_LIBRARY_INTERFACE_SYS_H_
virtual bool IsPathFile(const char *path)=0
Returns true if the path is a normal file.
virtual IDirectory * OpenDirectory(const char *path)=0
Opens a directory for reading.
virtual ~IDirectory()
Definition: ILibrarySys.h:84
virtual void CloseDirectory(IDirectory *dir)=0
Closes a directory and frees its handle.
virtual bool PathExists(const char *path)=0
Returns true if a path exists.
virtual bool IsEntryDirectory()=0
Returns whether the current entry is a directory.
virtual ILibrary * OpenLibrary(const char *path, char *error, size_t maxlength)=0
Opens a dynamic library file.
virtual void CloseLibrary()=0
Closes dynamic library and invalidates pointer.
virtual void NextEntry()=0
Advances to the next entry in the stream.
virtual const char * GetInterfaceName()
Must return a string defining the interface's unique name.
Definition: ILibrarySys.h:126
virtual size_t GetFileFromPath(char *buffer, size_t maxlength, const char *path)=0
Retrieve the file component of the given path.
Defines the Share System, responsible for shared resources and dependencies.
virtual void GetPlatformError(char *error, size_t maxlength)=0
Gets a platform-specific error message. This should only be called when an ILibrary function fails...
virtual unsigned int GetInterfaceVersion()
Must return an integer defining the interface's version.
Definition: ILibrarySys.h:130
Defines the base functionality required by a shared interface.
Definition: IShareSys.h:92
virtual size_t PathFormat(char *buffer, size_t maxlength, const char *pathfmt,...)=0
Formats a string similar to snprintf(), except corrects all non-platform compatible path separators t...
virtual bool IsPathDirectory(const char *path)=0
Returns true if the path is a normal directory.
virtual bool IsEntryValid()=0
Returns true if the current entry is valid (Used similarly to MoreFiles).
virtual bool IsEntryFile()=0
Returns whether the current entry is a file.
Contains various operating system specific code.
Definition: ILibrarySys.h:123
virtual void * GetSymbolAddress(const char *symname)=0
Retrieves a symbol pointer from the dynamic library.
Definition: IAdminSystem.h:63
virtual const char * GetFileExtension(const char *filename)=0
Returns a pointer to the extension in a filename.
Directory browsing abstraction.
Definition: ILibrarySys.h:80
virtual ~ILibrary()
Definition: ILibrarySys.h:59
virtual bool CreateFolder(const char *path)=0
Creates a directory.
virtual bool MoreFiles()=0
Returns true if there are more files to read, false otherwise.
Definition: ILibrarySys.h:55
virtual bool FileTime(const char *path, FileTimeType type, time_t *pTime)=0
Returns the requested timestamp of a file.
virtual const char * GetEntryName()=0
Returns the name of the current entry.