Project

General

Profile

Idea #5621

Updated by Radhika Chippada over 9 years ago

Today on IRC, sguthrie asked "how can I get the full path of a file in an arvados collection?" and Brett answered (in IRC) as follows: 
 11:38 The TASK_KEEPMOUNT environment variable tells you where the mount is.    So fundamentally you just have to do `os.path.join(os.environ['TASK_KEEPMOUNT'], collection_hash, file_path)`  
 So say you have a job that takes a reference, and then you create tasks to compare specific files against it.  
 11:38 You can get the path of the reference with get_job_param_mount, and the path of the specific file with get_task_param_mount. 
 11:38 Both results will start with the path in TASK_KEEPMOUNT, but they look at parameters in different places to generate the rest of the path. 
 11:38 Does that make sense? 

 I think it would be quite helpful if we capture some of these helpful tips and hints in some form of documentation.

Back