Filesystem Module
- class judge0.filesystem.File(**data)
File object for storing file content.
- Parameters:
name (str) – File name.
content (str or bytes, optional) – File content. If str is provided, it will be encoded to bytes.
- class judge0.filesystem.Filesystem(**data)
Filesystem object for storing multiple files.
- Parameters:
content (str or bytes or File or Iterable[File] or Filesystem, optional) – Filesystem content. If str or bytes is provided, it will be decoded to files.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
files:
list[File]
- find(name)
Find file by name in Filesystem object.
- Parameters:
name (str) – File name to find.
- Returns:
Found File object or None if not found.
- Return type:
File or None