EVOLUTION-MANAGER
Edit File: shortPathName.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Express File Paths in Short Form on Windows</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for shortPathName {utils}"><tr><td>shortPathName {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Express File Paths in Short Form on Windows</h2> <h3>Description</h3> <p>Convert file paths to the short form. This is an interface to the Windows API call <code>GetShortPathNameW</code>. </p> <h3>Usage</h3> <pre> shortPathName(path) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>path</code></td> <td> <p>character vector of file paths.</p> </td></tr> </table> <h3>Details</h3> <p>For most file systems, the short form is the ‘DOS’ form with 8+3 path components and no spaces, and this used to be guaranteed. But some file systems on recent versions of Windows do not have short path names when the long-name path will be returned instead. </p> <h3>Value</h3> <p>A character vector. The path separator will be <code>\</code>. If a file path does not exist, the supplied path will be returned with slashes replaced by backslashes. </p> <h3>Note</h3> <p>This is only available on Windows. </p> <h3>See Also</h3> <p><code><a href="../../base/html/normalizePath.html">normalizePath</a></code>. </p> <h3>Examples</h3> <pre> if(.Platform$OS.type == "windows") withAutoprint({ cat(shortPathName(c(R.home(), tempdir())), sep = "\n") }) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>