Skip to main content
Ctrl+K
PyOptiSLang - Home PyOptiSLang - Home
  • Getting started
  • User guide
  • API reference
  • optiSLang server API reference
  • Examples
    • Contribute
Ctrl+K
  • GitHub
Ctrl+K
  • Getting started
  • User guide
  • API reference
  • optiSLang server API reference
  • Examples
  • Contribute
  • GitHub

Section Navigation

  • Optislang
  • optiSLang process
  • Application
  • Project
  • Nodes
  • Project parametric
  • Logging
  • Helper functions and classes
    • get_osl_exec
    • find_all_osl_exec
    • File
      • exists
      • filename
      • last_modified_seconds
      • last_modified_str
      • path
      • size
    • RegisteredFile
    • FileOutputFormat
    • RegisteredFileUsage
  • PyAnsys
  • API reference
  • Helper functions and classes
  • File

File#

class ansys.optislang.core.io.File(path: Path | str)#

Provides for operating on files.

Methods

Attributes

File.exists

Check whether file exists.

File.filename

Get file name.

File.last_modified_seconds

Last modified time as a timestamp.

File.last_modified_str

Last modified time as a datetime.

File.path

Path to the file.

File.size

File size in bytes.

On this page
  • File
Edit on GitHub
  • Show Source

© Copyright (c) 2025 ANSYS, Inc. All rights reserved.

Created using Sphinx 8.2.3.

Built with the Ansys Sphinx Theme 1.3.2.
Last updated on