readWindowsShortcut         package:R.utils         R Documentation

_R_e_a_d_s _a _M_i_c_r_o_s_o_f_t _W_i_n_d_o_w_s _S_h_o_r_t_c_u_t (._l_n_k _f_i_l_e)

_D_e_s_c_r_i_p_t_i_o_n:

     Reads a Microsoft Windows Shortcut (.lnk file).

_U_s_a_g_e:

     ## Default S3 method:
     readWindowsShortcut(con, verbose=FALSE, ...)

_A_r_g_u_m_e_n_t_s:

     con: A 'connection' or a 'character' string (filename).

 verbose: If 'TRUE', extra information is written while reading.

     ...: Not used.

_D_e_t_a_i_l_s:

     The MIME type for a Windows Shortcut file is
     'application/x-ms-shortcut'.

_V_a_l_u_e:

     Returns a 'list' structure.

_A_u_t_h_o_r(_s):

     Henrik Bengtsson (<URL: http://www.braju.com/R/>)

_R_e_f_e_r_e_n_c_e_s:

     [1] Wotsit's Format, <URL: http://www.wotsit.org/>, 2005.

_S_e_e _A_l_s_o:

     'filePath'

_E_x_a_m_p_l_e_s:

     filename <- system.file("data-ex/HISTORY.LNK", package="R.utils")
     lnk <- readWindowsShortcut(filename)

     # Print all information
     print(lnk)

     # Get the relative path to the target file
     history <- file.path(dirname(filename), lnk$relativePath)

     # Alternatively, everything in one call
     history <- filePath(filename, expandLinks="relative")

     file.show(history)

