LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get WebDAV Creation Date

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?

0 Kudos
Message 1 of 21
(2,545 Views)

Does the Windows kernel "GetFileTime" function work for that?

I can't remember where I got the following code...

 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 21
(2,480 Views)

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.

0 Kudos
Message 3 of 21
(2,458 Views)

Using "File Info" from the open G toolkit seems to work on my CRIO-9035. Albeit the date is 2 years out.

 

File Info.png

0 Kudos
Message 4 of 21
(2,448 Views)

@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.

 

Example_VI_BD.png

0 Kudos
Message 5 of 21
(2,439 Views)

@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..

Message 6 of 21
(2,428 Views)

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.

0 Kudos
Message 7 of 21
(2,421 Views)

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. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 21
(2,400 Views)

@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.

0 Kudos
Message 9 of 21
(2,391 Views)

@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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 21
(2,381 Views)