05-16-2022 02:34 PM
I'm trying to migrate some code I have to WebDAV from other file transfer methods, and I can't seem to find a way to read the File Creation Date, of the remote file. The Directory Listing, and Path Info both return the Last Modification but I can't find a way to also get the File Creation. I did some searching and someone said it should support it, but in Windows Explorer the Creation Date is empty for the remote RT target.
Does WebDAV support reading the Creation Date on a file? If so how can I read this separately from the Last Mod date?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-22-2022 06:32 PM
Does the Windows kernel "GetFileTime" function work for that?
I can't remember where I got the following code...
05-23-2022 08:07 AM
Yes this would work if the target was Windows, and running on that Windows target. But I have a remote Linux RT target, with the main host program on Windows. So I will connect to the target with WebDAV, and from there I'd like to know if I can get the Creation Date, of that remote file. FTP for instance can read the Creation Date, and the last Modified Date of these remote files but I can't seem to find a way to do this with WebDAV.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-23-2022 09:23 AM - edited 05-23-2022 09:24 AM
Using "File Info" from the open G toolkit seems to work on my CRIO-9035. Albeit the date is 2 years out.
05-23-2022 10:24 AM
@OA1 wrote:
Using "File Info" from the open G toolkit seems to work on my CRIO-9035. Albeit the date is 2 years out.
Again, this isn't what I'm asking for. The VI will not be ran on the target, it is being run on another target, asking for the file creation of a remote file. Here is a picture.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-23-2022 12:40 PM
@Hooovahh wrote:
@OA1 wrote:
Using "File Info" from the open G toolkit seems to work on my CRIO-9035. Albeit the date is 2 years out.
Again, this isn't what I'm asking for. The VI will not be ran on the target, it is being run on another target, asking for the file creation of a remote file. Here is a picture.
I hope that is a disposable password..
05-23-2022 12:50 PM
Ya know I thought about using one of our generic passwords since it is just a picture right? But no I just mashed the keyboard for the example. But thanks for the comment.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-23-2022 01:28 PM - edited 05-23-2022 01:35 PM
That's what you get for password protected panels. Although I'm not quite sure if it would help as the VI most likely simply calls into resources/ni_webdavLVClient.dll and most likely does all the handling in the DLL.
Basically there is a webDAV property "creationdate" that is supposed to be available in the according WebDAV HTTP XML response. While parsing XML formats isn't really trivial it may have been actually more helpful if the WebDAV extension was built around the HTTPClient library rather than pulling another open source C code into a NI private DLL.
I just recently did an XML based REST API implementation all on top of HTTP Client VIs for our company HR database and am pulling and parsing something like 10000 records in less than a second and most of the time is spend in the HTTP Get Request itself and not in the actual parsing of the XML file. As long as you do not attempt to split up the XML file into an array of 10000 clusters containing 10 strings each, the parsing can be very fast.
05-23-2022 02:10 PM
@rolfk wrote:
That's what you get for password protected panels. Although I'm not quite sure if it would help as the VI most likely simply calls into resources/ni_webdavLVClient.dll and most likely does all the handling in the DLL.
Yup. The Path Info function just calls the ni_webdavLVClient.dll from the resource folder with the function call of ni_davg_start_path_info, and then ni_davg_finish_path_info. No other functions seemed like an obvious choice. It is possible NI hid some function inside the User Data Variant.
@rolfk wrote:
Basically there is a webDAV property "creationdate" that is supposed to be available in the according WebDAV HTTP XML response. While parsing XML formats isn't really trivial it may have been actually more helpful if the WebDAV extension was built around the HTTPClient library rather than pulling another open source C code into a NI private DLL.
Yes, please NI use more G! I found that page which made me think the API supports it and it just is NI's implementation that is missing the ability. Any help is appreciated.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-23-2022 05:10 PM
@Hooovahh wrote:
Yes, please NI use more G! I found that page which made me think the API supports it and it just is NI's implementation that is missing the ability. Any help is appreciated.
I have no other recommendation. It seems impossible to get at the internals of that handling. And I don't quite have the time to implement a WebDAV library on top of HTTP Client, as tempting as such a project may sound.