How to close file by api
Posted: 12.03.2024 09:36
Hello,
We can use file_open to open file in cuda,can we close file using similar method? I didn't find the associated method in API.
Thanks!
We can use file_open to open file in cuda,can we close file using similar method? I didn't find the associated method in API.
Thanks!
Code: Select all
def file_open(name, group=-1, options=''):
if isinstance(name, (list, tuple)):
if len(name)<2:
raise ValueError('Length of "name" param must be >=2')
if type(name[0]) is not str:
raise ValueError('Param name[0] must be str')
if type(name[1]) is not str:
raise ValueError('Param name[1] must be str')
return ct.file_open(name[0], name[1], group, options)
else:
return ct.file_open(name, '', group, options)