Skip to content

Commit 0697840

Browse files
committed
[OMCPath] prevent usage of stat() - not implemented using OMC
1 parent c94ea49 commit 0697840

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

OMPython/OMCSession.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,13 @@ def size(self) -> int:
431431

432432
raise OMCSessionException(f"Error reading file size for path {self.as_posix()}!")
433433

434+
def stat(self):
435+
"""
436+
The function stat() cannot be implemented using OMC.
437+
"""
438+
raise NotImplementedError("The function stat() cannot be implemented using OMC; "
439+
"use size() to get the file size.")
440+
434441

435442
if sys.version_info < (3, 12):
436443

0 commit comments

Comments
 (0)