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

Interface ITcFileAccess 1: Methods

Name

Description

FileOpen

Opens a file.

FileClose

Closes a file.

FileRead

Reads from a file.

FileWrite

Writes to a file.

FileSeek

Sets position in a file.

FileTell

Queries position in a file.

FileRename

Renames a file.

FileDelete

Deletes a file.

FileGetStatus

Gets the status of a file.

FileFindFirst

Searches for a file, first iteration.

FileFindNext

Searches for a file, next iteration.

FileFindClose

Closes a file search.

MkDir

Creates a directory.

RmDir

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.