X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fdata.py;h=e9a10799d8fe793c0b6ecf44f13216bba7d1deda;hp=0483cd7ad54bde929aeca8f80839fad5e6fa9d87;hb=11ae0d6e7e05cffb744f7b40f37309f07696d34a;hpb=3716a4cf43e0be2811dc8aeb0603f99209c42757 diff --git a/mudpy/data.py b/mudpy/data.py index 0483cd7..e9a1079 100644 --- a/mudpy/data.py +++ b/mudpy/data.py @@ -1,6 +1,6 @@ """Data interface functions for the mudpy engine.""" -# Copyright (c) 2004-2016 Jeremy Stanley . Permission +# Copyright (c) 2004-2017 Jeremy Stanley . Permission # to use, copy, modify, and distribute this software is granted under # terms provided in the LICENSE file distributed with this software. @@ -193,10 +193,10 @@ class DataFile: def find_file( file_name=None, - root_path=None, - search_path=None, - default_dir=None, + prefix=None, relative=None, + search=None, + stash=None, universe=None ): """Return an absolute file path based on configuration.""" @@ -209,16 +209,14 @@ def find_file( if universe: if hasattr( - universe, - "contents" - ) and "internal:storage" in universe.contents: - storage = universe.categories["internal"]["storage"] - if not root_path: - root_path = storage.get("root_path") - if not search_path: - search_path = storage.get("search_path") - if not default_dir: - default_dir = storage.get("default_dir") + universe, "contents") and "mudpy.filing" in universe.contents: + filing = universe.contents["mudpy.filing"] + if not prefix: + prefix = filing.get("prefix") + if not search: + search = filing.get("search") + if not stash: + stash = filing.get("stash") # if there's only one file loaded, try to work around a chicken