主权项 |
1. In a computer system comprising physical storage for assets stored using file paths, wherein a file path is an indicator of how to request a file from a file system, a method of generating the file path for the file comprising:
receiving, from a user, a request for the file path corresponding to the file, wherein the request does not provide a location in the physical storage; analyzing the request to identify an asset indicator, a type indicator and a pointer to a first type hierarchy data structure of the request, wherein the first type hierarchy data structure is distinct from a file system hierarchy of the physical storage; storing, in a memory of the computer system, a configuration file that specifies a mapping schema between the first type hierarchy data structure and the file system hierarchy; using the pointer to identify the first type hierarchy data structure from a plurality of type hierarchy data structures that each have a different node structure; searching the first type hierarchy data structure using the asset indicator and the type indicator to find an initial matching node that matches one of the asset indicator and the type indicator and then using the other one of the asset indicator and the type indicator to search sub-nodes of the initial matching node to find the final matching node; retrieving, from the configuration file, the mapping schema between the first type hierarchy data structure and the file system hierarchy for the type indicated by the type indicator, wherein the mapping schema is retrieved based on information obtained from the first type hierarchy data structure pointed to by the pointer in the request; evaluating the mapping schema using the final matching node to form the file path corresponding to the file in the file system hierarchy; and returning, to the user, the file path corresponding to the file, wherein the file path is usable to reference the file in the file system hierarchy. |