comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Linux-like touch command in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Linux-like touch command in IDL [message #90220 is a reply to message #90183] Thu, 12 February 2015 06:51 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
> I am looking to do a linux style 'touch' from IDL.

Does this do the same thing?

pro touch, path
if file_test(path, /DIRECTORY, /WRITE) then begin
temp_file = filepath('touch_temp_file.txt', ROOT_DIR=path)
openw, lun, filename, /GET_LUN
free_lun, lun
file_delete, temp_file
endif else if file_test(path, /WRITE) then begin
openw, lun, filename, /GET_LUN
free_lun, lun
endif else begin
message, 'PATH must be a file or directory with write priveleges.'
endelse
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EDG: Using IDL_MakeTempStruct() vs. IDL_ImportArray()
Next Topic: Variable attributes and undef vars

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Nov 28 07:53:16 PST 2025

Total time taken to generate the page: 0.00846 seconds