Skip to content

Commit d8e5e26

Browse files
committed
first attempt at accesing miniofs
1 parent 4c04bba commit d8e5e26

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pyclowder/files.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def get_download_url(connector, host, key, fileid, intermediatefileid=None, ext=
3838

3939

4040
# pylint: disable=too-many-arguments
41-
def download(connector, host, key, fileid, intermediatefileid=None, ext="", tracking=True):
41+
def download(connector, host, key, fileid, intermediatefileid=None, ext="", tracking=True, mounted_filesystem = False, mounted_dir = "None"):
4242
"""Download file to be processed from Clowder.
4343
4444
Keyword arguments:
@@ -49,7 +49,14 @@ def download(connector, host, key, fileid, intermediatefileid=None, ext="", trac
4949
intermediatefileid -- either same as fileid, or the intermediate file to be used
5050
ext -- the file extension, the downloaded file will end with this extension
5151
tracking -- should the download action be tracked
52+
mounted_filesystem -- if the minio storage is mounted to the local filesystem
5253
"""
54+
55+
if mounted_filesystem:
56+
if mounted_dir == "None":
57+
mounted_dir = "/clowderfs"
58+
inputfilename = "/clowderfs/" + fileid
59+
return inputfilename
5360
client = ClowderClient(host=host, key=key)
5461
inputfilename = files.download(connector, client, fileid, intermediatefileid, ext)
5562
return inputfilename

0 commit comments

Comments
 (0)