Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3946 closed enhancement (fixed)

Make OpenFileNameArg check that file exists

Reported by: Tom Goddard Owned by: pett
Priority: moderate Milestone:
Component: Input/Output Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Would be convenient if OpenFileNameArg checked that the file exists so all the code that takes file paths don't have to do their own checks.

Eric says that the open command is currently using OpenFileNameArg to accept database ids so that would have to be changed to use a new FileOrIdArg.

Change History (2)

comment:1 by pett, 5 years ago

Status: assignedaccepted

comment:2 by pett, 5 years ago

Resolution: fixed
Status: acceptedclosed

The various open/save arg types now have a 'check_existence' class variable (True/False respectively) that controls whether the file/folder name is checked for existence. The 'open' command turns off the check and does it itself as needed.

Last edited 5 years ago by pett (previous) (diff)
Note: See TracTickets for help on using tickets.