Page 1 of 1

API Call(s) To Detect New Files

PostPosted: Thu Jan 04, 2018 3:59 pm
by DebbieM
It is my understanding that the API has the ability to detect new files. Can you point us to what classes do that or some examples of how to do that?

Re: API Call(s) To Detect New Files

PostPosted: Thu Jan 04, 2018 4:47 pm
by jclausius
The Vault Client API doesn't have anything that would automatically notify code through an event or something, but does have a call you can make to scan for changes within a working folder.

What are you looking to achieve? Do you want to see new files committed to the repository or looking to see any new files added to a local working folder on disk?

Regardless, in either case, you'd have to write something to 'poll' the source looking for changes.

Re: API Call(s) To Detect New Files

PostPosted: Thu Jan 04, 2018 11:01 pm
by DebbieM
Something similar to the "Detect new files" option when you right-click on a folder in vault.
We are looking for files added to the working folder by Redgate's Sql Source Control.
We want to try to automate the procedure of adding those files to Vault.
We currently use the "Detect New Files" option in the GUI.

Re: API Call(s) To Detect New Files

PostPosted: Fri Jan 05, 2018 9:44 am
by jclausius
Ahh... I misunderstood. Thought you were looking for something to automatically notify you when something was added. ( I've edited my original response. )

Are you using Vault 10 with SQL Source Control? We did add new commands to the command line client in order to integrate using their template solution, which if I recall uses an xml template as some sort of config file maping Vault commands so SQL SourceControl can shell out to the command line client to do an operation.

In Vault 10, the command line client's 'DETECTNEW' command will do a scan and return back the changes made in a working folder. Is that what you're looking for? Or are you looking to use the API to write your own client?

Re: API Call(s) To Detect New Files

PostPosted: Fri Jan 05, 2018 1:58 pm
by DebbieM
Thank you...we did find ServerOperations.ProcessCommandDetectNew after some digging and were able to create the automated tool we were hoping for.

Re: API Call(s) To Detect New Files

PostPosted: Fri Jan 05, 2018 2:29 pm
by jclausius
Excellent! Thanks for reporting back.