Skip to content

Commit

Permalink
opener
Browse files Browse the repository at this point in the history
  • Loading branch information
d-w-moore committed Sep 16, 2024
1 parent 3e717e9 commit 77b24b1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions fs_irods/opener.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import irods.test.helpers as helpers

import fs
from fs.opener import Opener
from fs.opener.registry import registry

from . import iRODSFS

@registry.install
class iRODSOpener(Opener):

protocols = ['irods']

# TODO - Flesh this out. This is a stub just to get an initial fs.open_fs('irods://...') working.

def open_fs(self, fs_url, parse_result, writeable, create, cwd):

# TODO - We can use parse_result.resource to determine the root_path parameter value
# in the iRODSFS constructor, once an issue 16 fix is merged.

return iRODSFS(helpers.make_session())

0 comments on commit 77b24b1

Please sign in to comment.