Information about parent collection while deleting a nested object.

7 views
Skip to first unread message

Urvika Gola

unread,
Mar 14, 2023, 8:10:50 PM3/14/23
to iRODS-Chat
Hello,

When deleting an object that is nested within a collection (e.g. /home/user/parent_collection_1/parent_collection_2/obj_1), if a user performs the command "icd /home/user/parent_collection_1/parent_collection_2/; irm obj_1", a new structure will be created in the trash as follows: zone/trash/home/user/parent_collection_1/parent_collection_2/obj_1.

In this scenario, how can we obtain information about the parent collection (parent_collection_1) in the trash using dynamic PEP (API), such as its collection ID/path in trash?

I tracked the series of dynamic PEP API calls that are made when a nested object is moved to the trash, but I noticed that the "pep_api_coll_create" PEP is not triggered in this process. This PEP could have been used to track the creation of a collection in trash, would have been helpful in determining the collection ID/path of the parent collection in the trash.

What is the right way to get this information about the parent collection?

Thank you for your inputs in advance.
Regards,
Urvika.

Terrell Russell

unread,
Mar 14, 2023, 8:41:16 PM3/14/23
to irod...@googlegroups.com
Hi Urvika,

This will display the obj_path of the object being moved to the trash.

pep_api_data_obj_unlink_pre(*INSTANCE,*COMM,*DATAOBJUNLINKINP){
   writeLine("serverLog",*DATAOBJUNLINKINP.obj_path);
}

I think you will have to derive/calculate the path of the new object in the trash.

Terrell




--
--
The Integrated Rule-Oriented Data System (iRODS) - https://irods.org
 
iROD-Chat: http://groups.google.com/group/iROD-Chat
---
You received this message because you are subscribed to the Google Groups "iRODS-Chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/irod-chat/44984d27-fb75-4237-b63a-df31a5c5bb1cn%40googlegroups.com.

Urvika Gola

unread,
Mar 16, 2023, 12:24:38 PM3/16/23
to iRODS-Chat
Thank you Terrell.
Reply all
Reply to author
Forward
0 new messages