snowflake.snowpark_checkpoints_configuration.io_utils.EnvStrategy¶
- class snowflake.snowpark_checkpoints_configuration.io_utils.EnvStrategy¶
Bases:
ABC
An abstract base class that defines methods for file and directory operations.
Subclasses should implement these methods to provide environment-specific behavior.
Methods
- abstractmethod file_exists(path: str) bool ¶
Check if a file exists.
- Parameters:
path – The path to the file.
- Returns:
True if the file exists, False otherwise.
- Return type:
bool
- abstractmethod getcwd() str ¶
Get the current working directory.
- Returns:
The current working directory.
- Return type:
str
- abstractmethod read(file_path: str, mode: str = 'r', encoding: str | None = None) str ¶
Read content from a file.
- Parameters:
file_path – The path to the file to read from.
mode – The mode in which to open the file.
encoding – The encoding to use for reading the file.
- Returns:
The content of the file.
- Return type:
str