SysFileGetStatus2 (FUN) ¶ FUNCTION SysFileGetStatus2 : SYS_FILE_STATUS Get the file status InOut: Scope Name Type Comment Return SysFileGetStatus2 SYS_FILE_STATUS File status. See category file status Input hFile RTS_IEC_HANDLE Handle of the file pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysFileGetTime (FUN) ¶ FUNCTION SysFileGetTime : RTS_IEC_RESULT Get file time of the specified file. A standard path will be added to the filename, if no path is specified. InOut: Scope Name Type Comment Return SysFileGetTime RTS_IEC_RESULT The runtime system error code (see CmpErrors.library) Input szFileName STRING File name. File name can contain an absolute or relative path to the file. Path entries must be separated with a Slash (/) and not with a Backslash (\)! ptFileTime POINTER TO SYS_FILETIME Pointer to get the file time results.
SysFileOpen (FUN) ¶ FUNCTION SysFileOpen : RTS_IEC_HANDLE Open or create file. A standard path will be added to the filename, if no path is specified in the file name. If a file extension is specified in the settings, this path will be used (see category settings). Note File name can contain an absolute or relative path to the file. Path entries must be separated with a Slash (/) and not with a Backslash (\)! InOut: Scope Name Type Comment Return SysFileOpen RTS_IEC_HANDLE Handle to the file or RTS_INVALID_HANDLE if failed Input szFile STRING File name. File name can contain an absolute or relative path to the file. Path entries must be separated with a Slash (/) and not with a Backslash (\)! am ACCESS_MODE Requested access mode to the file. See ACCESS_MODE for details. Here find some examples: AM_READ If file does not exist, an error is returned. If the file exists, the file will be opened AM_WRITE If file does not exist, a new file will be created. If the file exists, it will be overwritten! AM_APPEND If the file does not exist, an error is returned. If the file exists, the file will be opened pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysFileRead (FUN) ¶ FUNCTION SysFileRead : __XWORD Read number of bytes out of the file InOut: Scope Name Type Comment Return SysFileRead __XWORD Number of bytes read from file. 0=if failed Input hFile RTS_IEC_HANDLE Handle of the file pbyBuffer POINTER TO BYTE Pointer to buffer for read data ulSize __XWORD Number of bytes to read from file. Must be less or equal the buffer size! pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysFileRename (FUN) ¶ FUNCTION SysFileRename : RTS_IEC_RESULT Rename the file. A standard path will be added to the filename, if no path is specified. InOut: Scope Name Type Comment Return SysFileRename RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library) Input szOldFileName STRING Old file name. File name can contain an absolute or relative path to the file. Path entries must be separated with a Slash (/) and not with a Backslash (\)! szNewFileName STRING New file name. File name can contain an absolute or relative path to the file. Path entries must be separated with a Slash (/) and not with a Backslash (\)!
SysFileSetPos (FUN) ¶ FUNCTION SysFileSetPos : RTS_IEC_RESULT Set the file pointer to the specified position InOut: Scope Name Type Comment Return SysFileSetPos RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library) Input hFile RTS_IEC_HANDLE Handle of the file ulOffset __XWORD Offset to set from the beginning of the file
SysFileTruncate (FUN) ¶ FUNCTION SysFileTruncate : RTS_IEC_RESULT Set a new filesize. May be larger or smaller than current size. InOut: Scope Name Type Comment Return SysFileTruncate RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library) Input hFile RTS_IEC_HANDLE Handle of the file ulSizeNew __XWORD Size to set.
SysFileWrite (FUN) ¶ FUNCTION SysFileWrite : __XWORD Write number of bytes to the file. File must be opened with AM_WRITE or AM_APPEND . InOut: Scope Name Type Comment Return SysFileWrite __XWORD Number of bytes written to the file. 0=if failed Input hFile RTS_IEC_HANDLE Handle of the file pbyBuffer POINTER TO BYTE Pointer to buffer with data to write to file ulSize __XWORD Number of bytes to write in the file. Must be less or equal the buffer size! pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 20.04.2021, 16:03:32 companyName string 3S-Smart Software Solutions GmbH libraryFile SysFile.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile SysFile.clean.json version version 2.0.0.0 ProjectInformation LinkInSimulation bool True Released True LastModificationDateTime date 20.04.2021, 16:03:32 LibraryCategories library-category-list System|SysLibs Author string 3S - Smart Software Solutions GmbH Company System CompiledLibraryCompatibilityVersion CODESYS V3.5 SP15 Description See: Description DocFormat reStructuredText Placeholder SysFile Project SysFile Title SysFile Version version 3.5.17.0
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)