# Directory Source: https://www.tensorplay.cn/docs/generated/tensorplay.package.Directory.html ```python class tensorplay.package.Directory(name: str, is_dir: bool) ``` A file structure representation. Organized as Directory nodes that have lists of their Directory children. Directories for a package are created by calling [PackageImporter.file_structure()](/docs/generated/tensorplay.package.PackageImporter.html#tensorplay.package.PackageImporter.file_structure). ```python has_file(filename: str) → bool ``` Checks if a file is present in a [Directory](#tensorplay.package.Directory). Parameters: filename ([str](https://docs.python.org/3/builtins/stdtypes.html#str)) – Path of file to search for. Returns: If a [Directory](#tensorplay.package.Directory) contains the specified file. Return type: [bool](https://docs.python.org/3/builtins/functions.html#bool)