#include <public/ILibrarySys.h>
Inherits SourceMod::SMInterface.
Inheritance diagram for SourceMod::ILibrarySys:
Public Member Functions | |
| virtual const char * | GetInterfaceName () |
| Must return a string defining the interface's unique name. | |
| virtual unsigned int | GetInterfaceVersion () |
| Must return an integer defining the interface's version. | |
| virtual ILibrary * | OpenLibrary (const char *path, char *error, size_t maxlength)=0 |
| Opens a dynamic library file. | |
| virtual IDirectory * | OpenDirectory (const char *path)=0 |
| Opens a directory for reading. | |
| 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 | IsPathFile (const char *path)=0 |
| Returns true if the path is a normal file. | |
| virtual bool | IsPathDirectory (const char *path)=0 |
| Returns true if the path is a normal directory. | |
| 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. Win32 equivalent: GetLastError() + FormatMessage() POSIX equivalent: errno + strerror(). | |
| 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 to be the correct platform character. | |
| virtual const char * | GetFileExtension (const char *filename)=0 |
| Returns a pointer to the extension in a filename. | |
| virtual bool | CreateFolder (const char *path)=0 |
| Creates a directory. | |
| virtual bool | FileTime (const char *path, FileTimeType type, time_t *pTime)=0 |
| Returns the requested timestamp of a file. | |
Definition at line 123 of file ILibrarySys.h.
| virtual ILibrary* SourceMod::ILibrarySys::OpenLibrary | ( | const char * | path, | |
| char * | error, | |||
| size_t | maxlength | |||
| ) | [pure virtual] |
Opens a dynamic library file.
| path | Path to library file (.dll/.so). | |
| error | Buffer for any error message (may be NULL). | |
| maxlength | Maximum length of error buffer. |
| virtual IDirectory* SourceMod::ILibrarySys::OpenDirectory | ( | const char * | path | ) | [pure virtual] |
Opens a directory for reading.
| path | Path to directory. |
| virtual void SourceMod::ILibrarySys::CloseDirectory | ( | IDirectory * | dir | ) | [pure virtual] |
| virtual void SourceMod::ILibrarySys::GetPlatformError | ( | char * | error, | |
| size_t | maxlength | |||
| ) | [pure virtual] |
Gets a platform-specific error message. This should only be called when an ILibrary function fails. Win32 equivalent: GetLastError() + FormatMessage() POSIX equivalent: errno + strerror().
| error | Error message buffer. | |
| maxlength | Maximum length of error buffer. |
| virtual size_t SourceMod::ILibrarySys::PathFormat | ( | char * | buffer, | |
| size_t | maxlength, | |||
| const char * | pathfmt, | |||
| ... | ||||
| ) | [pure virtual] |
Formats a string similar to snprintf(), except corrects all non-platform compatible path separators to be the correct platform character.
| buffer | Output buffer pointer. | |
| maxlength | Output buffer size. | |
| pathfmt | Format string of path. | |
| ... | Format string arguments. |
| virtual const char* SourceMod::ILibrarySys::GetFileExtension | ( | const char * | filename | ) | [pure virtual] |
Returns a pointer to the extension in a filename.
| filename | Name of file from which the extension should be extracted. |
| virtual bool SourceMod::ILibrarySys::CreateFolder | ( | const char * | path | ) | [pure virtual] |
Creates a directory.
| path | Full, absolute path of the directory to create. |
| virtual bool SourceMod::ILibrarySys::FileTime | ( | const char * | path, | |
| FileTimeType | type, | |||
| time_t * | pTime | |||
| ) | [pure virtual] |
Returns the requested timestamp of a file.
NOTE: On FAT file systems, the access and creation times may not be valid.
| path | Path to file. | |
| type | FileTimeType of time value to request. | |
| pTime | Pointer to store time. |
1.5.1