Interface ITcFileAccess
Interface to access file system from TwinCAT C++ modules
Syntax
TCOM_DECL_INTERFACE("742A7429-DA6D-4C1D-80D8-398D8C1F1747", ITcFileAccess) __declspec(novtable) ITcFileAccess: public ITcUnknown
Required include: TcFileAccessInterfaces.h
Methods
Name | Description |
---|---|
Opens a file. | |
Closes a file. | |
Reads from a file. | |
Writes to a file. | |
Sets position in a file. | |
Queries position in a file. | |
Renames a file. | |
Deletes a file. | |
Gets the status of a file. | |
Searches for a file, first iteration. | |
Searches for a file, next iteration. | |
Closes a file search. | |
Creates a directory. | |
Deletes a directory. |
Remarks
The ITcFileAccess interface used to access files from file systems.
Since the provided methods are blocking this should not be used in CycleUpdate() / realtime context. The derived interface ITcFileAccessAsync adds a Check() Method, which could be used instead.
Please have a look at Sample20a: FileIO-Cyclic Read / Write.
The interface is implemented by module class CID_TcFileAccess.
- Method ITcFileAccess:FileOpen
- Method ITcFileAccess:FileClose
- Method ITcFileAccess:FileRead
- Method ITcFileAccess:FileWrite
- Method ITcFileAccess:FileSeek
- Method ITcFileAccess:FileTell
- Method ITcFileAccess:FileRename
- Method ITcFileAccess:FileDelete
- Method ITcFileAccess:FileGetStatus
- Method ITcFileAccess:FileFindFirst
- Method ITcFileAccess:FileFindNext
- Method ITcFileAccess:FileFindClose
- Method ITcFileAccess:MkDir
- Method ITcFileAccess:RmDir