mdlincoln / clipr

R functions for reading and writing from the system clipboard
http://matthewlincoln.net/clipr/
151 stars 24 forks source link

clipr::read_path() #37

Closed danielsjf closed 5 years ago

danielsjf commented 5 years ago

As a feature request, it would be convenient if clipr could also have a function to get the file or folder name of an object.

In Windows, there are ways to do this. https://www.codeproject.com/Questions/614723/GetFileName-from-Clipboard-Cplusplus

mdlincoln commented 5 years ago

Thanks for this idea. Unfortunately, getting the full path rather than just the file name seems entirely platform-dependent. For example, "copying" a file on OS X and then calling pbpaste gives the file name but nothing about the larger path. clipr strives to be platform-independent so it can do the same thing regardless of being on Windows, OS X, Red Hat, etc.