File: _api_impl.py

package info (click to toggle)
python-irodsclient 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,352 kB
  • sloc: python: 16,650; xml: 525; sh: 104; awk: 5; sql: 3; makefile: 3
file content (14 lines) | stat: -rw-r--r-- 488 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from irods.api_number import api_number
from irods.message import iRODSMessage, JSON_Message


def _touch_impl(session, path, **options):
    with session.pool.get_connection() as conn:
        message_body = JSON_Message(
            {"logical_path": path, "options": options}, conn.server_version
        )
        message = iRODSMessage(
            "RODS_API_REQ", msg=message_body, int_info=api_number["TOUCH_APN"]
        )
        conn.send(message)
        response = conn.recv()