tSysFileGetPos (STRUCT) ¶ TYPE tSysFileGetPos : STRUCT Parameter to get actual file pointer position InOut: Name Type Comment pulPos POINTER TO __XWORD [OUT] Pointer to get actual position of the file pointer from the beginning of the file pulOut POINTER TO RTS_IEC_RESULT [OUT] Pointer to the runtime system error code (see CmpErrors2 Interface Library)
tSysFileGetSize (STRUCT) ¶ TYPE tSysFileGetSize : STRUCT Parameter to get file size of the file specified by name InOut: Name Type Comment szFileName STRING(254) 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 (\)! pResult POINTER TO RTS_IEC_RESULT [OUT] Pointer to the runtime system error code (see CmpErrors2 Interface Library) - ERR_OK: Successful - ERR_NO_OBJECT: File not available - ERR_FAILED: Failed to get file size pulOut POINTER TO __XWORD [OUT] Size of the file in bytes
tSysFileGetSizeByHandle (STRUCT) ¶ TYPE tSysFileGetSizeByHandle : STRUCT Parameter to get file size of the file specified by handle InOut: Name Type Comment pResult POINTER TO RTS_IEC_RESULT [OUT] Pointer to the runtime system error code (see CmpErrors2 Interface Library) pulOut POINTER TO __XWORD [OUT] Size of the file in bytes
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)
SysFile Library Documentation ¶ Company System Title SysFile Version 3.5.17.0 Categories System|SysLibs Author 3S - Smart Software Solutions GmbH Placeholder SysFile Description 1 ¶ This library provides access to the file functionality of the runtime system. Contents: ¶ ACCESS_MODE (Enum) SYS_FILETIME (Struct) SYS_FILE_STATUS (Enum) SysFileClose (Function) SysFileCopy (Function) SysFileDelete (Function) SysFileDeleteByHandle (Function) SysFileEOF (Function) SysFileFlush (Function) SysFileGetName (Function) SysFileGetName2 (Function) SysFileGetPath (Function) SysFileGetPos (Function) SysFileGetSize (Function) SysFileGetSizeByHandle (Function) SysFileGetStatus (Function) SysFileGetStatus2 (Function) SysFileGetTime (Function) SysFileOpen (Function) SysFileRead (Function) SysFileRename (Function) SysFileSetPos (Function) SysFileTruncate (Function) SysFileWrite (Function) Indices and tables ¶ 1 Based on SysFile.library, last modified 20.04.2021, 16:03:32. LibDoc 4.4.0.0-b.27 The content file SysFile.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 16:03:32.
SYS_FILETIME (STRUCT) ¶ TYPE SYS_FILETIME : STRUCT File TIME Timestamps of the specified file. InOut: Name Type Comment tCreation UDINT Creation time of the file tLastAccess UDINT Time of as access to the file tLastModification UDINT Time of last modification
ACCESS_MODE (ENUM) ¶ TYPE ACCESS_MODE : Access mode File modes to open a file. Note For all *_PLUS modes be aware, that after reading from a file, writing can only be done after a call to SysFileGetPos or SysFileSetPos ! If you call SysFileWrite right after SysFileRead , the file pointer could be on an invalid position! Correct example: SysFileRead (); SysFileGetPos (); SysFileWrite (); InOut: Name Comment AM_READ Open an existing file with Read access. If file does not exist, Open fails AM_WRITE Create new file with Write access. If file does exist, content is discarded AM_APPEND Open an existing file with Append (only write) access. If file does not exist, Open fails AM_READ_PLUS Open an existing file with Read/Write access. If file does not exist, Open fails AM_WRITE_PLUS Create new file with Read/Write access. If file does exist, content is discarded AM_APPEND_PLUS Open an existing file with Append (read/write) access. If file does not exist, Open creates a new file
SYS_FILE_STATUS (ENUM) ¶ TYPE SYS_FILE_STATUS : File status Actual file status of the specified file. InOut: Name Comment FS_OK File could be opened FS_NO_FILE No file available FS_ILLEGAL_POS Illegal position in the file FS_FULL No more space on the filesystem FS_EOF End of file reached
SysFileClose (FUN) ¶ FUNCTION SysFileClose : RTS_IEC_RESULT Close a file specified by handle InOut: Scope Name Type Comment Return SysFileClose RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library) Input hFile RTS_IEC_HANDLE Handle of the file
SysFileCopy (FUN) ¶ FUNCTION SysFileCopy : RTS_IEC_RESULT Copy one file to another. A standard path will be added to the filename, if no path is specified. InOut: Scope Name Type Comment Return SysFileCopy RTS_IEC_RESULT The runtime system error code (see CmpErrors.library) Input szDestFileName STRING Destination 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 (\)! szSourceFileName STRING Source 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 (\)! pulCopied POINTER TO __XWORD Number of bytes copied