readWindowsShortcut
Reads a Microsoft Windows Shortcut (.lnk file)
Reads a Microsoft Windows Shortcut (.lnk file).
Usage
## S3 method for class 'default':
readWindowsShortcut(con, verbose=FALSE, ...)
Arguments
- con
- A
connection
or acharacter
string (filename). - verbose
- If
TRUE
, extra information is written while reading. - ...
- Not used.
Details
The MIME type for a Windows Shortcut file is
application/x-ms-shortcut
.
Value
- Returns a
list
structure.
References
[1] Wotsit's Format,
See Also
Examples
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)