Skip to content

Commit 63116ee

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

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
@@ -428,6 +428,13 @@ def size(self) -> int:
428428

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

431+
def stat(self):
432+
"""
433+
The function stat() cannot be implemented using OMC.
434+
"""
435+
raise NotImplementedError("The function stat() cannot be implemented using OMC; "
436+
"use size() to get the file size.")
437+
431438

432439
if sys.version_info < (3, 12):
433440

0 commit comments

Comments
 (0)