From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
GregSands

Close Zip File should return the file path

Status: New

A simple request - Close Zip File should return the file path, in the same way that other file closing VIs do.

CloseZipFile.jpg

3 Comments
Neil.Pate
Active Participant

I always found it a bit weird that the File Close did that. Would it not be simpler to remove the the File Path from the File Close?

 

I am only half joking, this seems like over complicating the API. What is the use case that you no longer have access to the original path? (I am not actually suggesting NI remove it from the existing prims and potentially break lots of code).

crossrulz
Knight of NI

Neil,

You initialize a file at the beginning of your program (think log files) and then at the end you close it.  Maybe you want to add a viewer that reads the file after you close it.  So you would have to carry around both the reference and the path.  Or you can just get the path when you close it.  It does clean some things up.  Though, there is also the Reference To Path primitive for the File IO references.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Neil.Pate
Active Participant

Sorry crossrulz, just seen your comment now.

 

I guess I have just never needed to do that. If I need access to my original path I always have it stored in the class (or whatever) is using it.