Browse Source

pkgdown

master
boB Rudis 6 years ago
parent
commit
ed5d402831
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 1
      NAMESPACE
  2. 1
      NEWS.md
  3. 92
      R/aaa.R
  4. 6
      R/df.R
  5. 17
      R/util.R
  6. 131
      docs/CONDUCT.html
  7. 125
      docs/LICENSE-text.html
  8. 132
      docs/authors.html
  9. 145
      docs/docsearch.css
  10. 315
      docs/index.html
  11. 11
      docs/jquery.sticky-kit.min.js
  12. 12
      docs/link.svg
  13. 129
      docs/news/index.html
  14. 227
      docs/pkgdown.css
  15. 174
      docs/pkgdown.js
  16. 5
      docs/pkgdown.yml
  17. 195
      docs/reference/get_xattr.html
  18. 187
      docs/reference/get_xattr_df.html
  19. 189
      docs/reference/get_xattr_raw.html
  20. 189
      docs/reference/get_xattr_size.html
  21. 185
      docs/reference/has_xattrs.html
  22. 209
      docs/reference/index.html
  23. 149
      docs/reference/is_bplist.html
  24. 185
      docs/reference/list_xattrs.html
  25. 139
      docs/reference/pipe.html
  26. 155
      docs/reference/read_bplist.html
  27. 191
      docs/reference/rm_xattr.html
  28. 193
      docs/reference/set_xattr.html
  29. 178
      docs/reference/xattrs.html
  30. 3
      man/get_xattr_df.Rd

1
NAMESPACE

@ -9,6 +9,7 @@ export(has_xattrs)
export(is_bplist)
export(list_xattrs)
export(read_bplist)
export(read_xattrs)
export(remove_xattr)
export(rm_xattr)
export(set_xattr)

1
NEWS.md

@ -1,2 +1,3 @@
0.1.0
* Initial release

92
R/aaa.R

@ -0,0 +1,92 @@
# Less cool counterparts to purrr's side-effect capture-rs
#
# Most of the helper functions are 100% from output.R in purrr repo
#
# @param quiet Hide errors (`TRUE`, the default), or display them
# as they occur?
# @param otherwise Default value to use when an error occurs.
#
# @return `safely`: wrapped function instead returns a list with
# components `result` and `error`. One value is always `NULL`.
#
# `quietly`: wrapped function instead returns a list with components
# `result`, `output`, `messages` and `warnings`.
#
# `possibly`: wrapped function uses a default value (`otherwise`)
# whenever an error occurs.
safely <- function(.f, otherwise = NULL, quiet = TRUE) {
function(...) capture_error(.f(...), otherwise, quiet)
}
quietly <- function(.f) {
function(...) capture_output(.f(...))
}
possibly <- function(.f, otherwise, quiet = TRUE) {
force(otherwise)
function(...) {
tryCatch(.f(...),
error = function(e) {
if (!quiet)
message("Error: ", e$message)
otherwise
},
interrupt = function(e) {
stop("Terminated by user", call. = FALSE)
}
)
}
}
capture_error <- function(code, otherwise = NULL, quiet = TRUE) {
tryCatch(
list(result = code, error = NULL),
error = function(e) {
if (!quiet)
message("Error: ", e$message)
list(result = otherwise, error = e)
},
interrupt = function(e) {
stop("Terminated by user", call. = FALSE)
}
)
}
capture_output <- function(code) {
warnings <- character()
wHandler <- function(w) {
warnings <<- c(warnings, w$message)
invokeRestart("muffleWarning")
}
messages <- character()
mHandler <- function(m) {
messages <<- c(messages, m$message)
invokeRestart("muffleMessage")
}
temp <- file()
sink(temp)
on.exit({
sink()
close(temp)
})
result <- withCallingHandlers(
code,
warning = wHandler,
message = mHandler
)
output <- paste0(readLines(temp, warn = FALSE), collapse = "\n")
list(
result = result,
output = output,
warnings = warnings,
messages = messages
)
}
s_read_xml <- safely(xml2::read_xml)

6
R/df.R

@ -14,4 +14,8 @@ get_xattr_df <- function(path, follow_symlinks = TRUE) {
class(xdf) <- c("tbl_df", "tbl", "data.frame")
xdf
}
}
#' @rdname get_xattr_df
#' @export
read_xattrs <- get_xattr_df

17
R/util.R

@ -20,17 +20,24 @@ convert_plist <- function(path) {
if (plutil == "plistutil") {
sys::exec_internal(
plutil, arg=c("-i", path)
plutil,
arg=c("-i", path),
error = FALSE
) -> res
} else {
sys::exec_internal(
plutil,
args = c("-convert", "xml1", path, "-o", "-")
args = c("-convert", "xml1", path, "-o", "-"),
error = FALSE
) -> res
}
out <- xml2::read_xml(res$stdout)
xml2::as_list(out)
if (!is.null(res$stdout)) {
out <- s_read_xml(res$stdout)
if (is.null(out$result)) return(list(NA))
xml2::as_list(out$result)
} else {
return(list(NA))
}
}

131
docs/CONDUCT.html

@ -0,0 +1,131 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contributor Code of Conduct • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="jquery.sticky-kit.min.js"></script>
<script src="pkgdown.js"></script>
<meta property="og:title" content="Contributor Code of Conduct" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-title-body">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Contributor Code of Conduct</h1>
</div>
<div id="contributor-code-of-conduct" class="section level1">
<p>As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.</p>
<p>We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.</p>
<p>Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.</p>
<p>Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.</p>
<p>Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.</p>
<p>This Code of Conduct is adapted from the Contributor Covenant (<a href="http:contributor-covenant.org" class="uri">http:contributor-covenant.org</a>), version 1.0.0, available at <a href="http://contributor-covenant.org/version/1/0/0/" class="uri">http://contributor-covenant.org/version/1/0/0/</a></p>
</div>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

125
docs/LICENSE-text.html

@ -0,0 +1,125 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>License • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="jquery.sticky-kit.min.js"></script>
<script src="pkgdown.js"></script>
<meta property="og:title" content="License" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-title-body">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>License</h1>
</div>
<pre>YEAR: 2018
COPYRIGHT HOLDER: Bob Rudis
</pre>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

132
docs/authors.html

@ -0,0 +1,132 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Authors • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
<script src="jquery.sticky-kit.min.js"></script>
<script src="pkgdown.js"></script>
<meta property="og:title" content="Authors" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-authors">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Authors</h1>
</div>
<ul class="list-unstyled">
<li>
<p><strong>Bob Rudis</strong>. Author, maintainer. <a href='https://orcid.org/0000-0001-5670-2640' target='orcid.widget'><img src='https://members.orcid.org/sites/default/files/vector_iD_icon.svg' class='orcid' height='16'></a>
</p>
</li>
<li>
<p><strong>Brandon Fosdick</strong>. Author.
<br /><small>extattr.h C++ library</small></p>
</li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

145
docs/docsearch.css

@ -0,0 +1,145 @@
/* Docsearch -------------------------------------------------------------- */
/*
Source: https://github.com/algolia/docsearch/
License: MIT
*/
.algolia-autocomplete {
display: block;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1
}
.algolia-autocomplete .ds-dropdown-menu {
width: 100%;
min-width: none;
max-width: none;
padding: .75rem 0;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, .1);
box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175);
}
@media (min-width:768px) {
.algolia-autocomplete .ds-dropdown-menu {
width: 175%
}
}
.algolia-autocomplete .ds-dropdown-menu::before {
display: none
}
.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] {
padding: 0;
background-color: rgb(255,255,255);
border: 0;
max-height: 80vh;
}
.algolia-autocomplete .ds-dropdown-menu .ds-suggestions {
margin-top: 0
}
.algolia-autocomplete .algolia-docsearch-suggestion {
padding: 0;
overflow: visible
}
.algolia-autocomplete .algolia-docsearch-suggestion--category-header {
padding: .125rem 1rem;
margin-top: 0;
font-size: 1.3em;
font-weight: 500;
color: #00008B;
border-bottom: 0
}
.algolia-autocomplete .algolia-docsearch-suggestion--wrapper {
float: none;
padding-top: 0
}
.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column {
float: none;
width: auto;
padding: 0;
text-align: left
}
.algolia-autocomplete .algolia-docsearch-suggestion--content {
float: none;
width: auto;
padding: 0
}
.algolia-autocomplete .algolia-docsearch-suggestion--content::before {
display: none
}
.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header {
padding-top: .75rem;
margin-top: .75rem;
border-top: 1px solid rgba(0, 0, 0, .1)
}
.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column {
display: block;
padding: .1rem 1rem;
margin-bottom: 0.1;
font-size: 1.0em;
font-weight: 400
/* display: none */
}
.algolia-autocomplete .algolia-docsearch-suggestion--title {
display: block;
padding: .25rem 1rem;
margin-bottom: 0;
font-size: 0.9em;
font-weight: 400
}
.algolia-autocomplete .algolia-docsearch-suggestion--text {
padding: 0 1rem .5rem;
margin-top: -.25rem;
font-size: 0.8em;
font-weight: 400;
line-height: 1.25
}
.algolia-autocomplete .algolia-docsearch-footer {
float: none;
width: auto;
height: auto;
padding: .75rem 1rem 0;
font-size: .95rem;
line-height: 1;
color: #767676;
background-color: rgb(255, 255, 255);
border-top: 1px solid rgba(0, 0, 0, .1)
}
.algolia-autocomplete .algolia-docsearch-footer--logo {
display: inline;
overflow: visible;
color: inherit;
text-indent: 0;
background: 0 0
}
.algolia-autocomplete .algolia-docsearch-suggestion--highlight {
color: #FF8C00;
background: rgba(232, 189, 54, 0.1)
}
.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {
box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5)
}
.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content {
background-color: rgba(192, 192, 192, .15)
}

315
docs/index.html

@ -0,0 +1,315 @@
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Work With Filesystem Object Extended Attributes • xattrs</title>
<!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="jquery.sticky-kit.min.js"></script><script src="pkgdown.js"></script><meta property="og:title" content="Work With Filesystem Object Extended Attributes">
<meta property="og:description" content="Filesystem path target extended attributes store extra, customizable,
small bits of info. For example, author name, file character encoding, short
comments, security status, etc. Methods are provided to list, extract and work
with these attributes.">
<meta name="twitter:card" content="summary">
<!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-article">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
<!--/.container -->
</div>
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<!-- README.md is generated from README.Rmd. Please edit that file -->
<div id="xattrs" class="section level1">
<div class="page-header"><h1 class="hasAnchor">
<a href="#xattrs" class="anchor"></a>xattrs</h1></div>
<p>Work With Filesystem Object Extended Attributes</p>
<div id="description" class="section level2">
<h2 class="hasAnchor">
<a href="#description" class="anchor"></a>Description</h2>
<p>Filesystem path target extended attributes store extra, customizable, small bits of info. For example, author name, file character encoding, short comments, security status, etc. Methods are provided to list, extract and work with these attributes.</p>
</div>
<div id="note" class="section level2">
<h2 class="hasAnchor">
<a href="#note" class="anchor"></a>NOTE</h2>
<p>I don’t think this will work on Windows.</p>
</div>
<div id="whats-inside-the-tin" class="section level2">
<h2 class="hasAnchor">
<a href="#whats-inside-the-tin" class="anchor"></a>What’s Inside The Tin</h2>
<p>The following functions are implemented:</p>
<ul>
<li>
<code>get_xattr</code>: Retrieve the contents of the named xattr</li>
<li>
<code>get_xattr_df</code>: Retrieve a data frame of xattr names, sizes and (raw) contents for a target path</li>
<li>
<code>get_xattr_raw</code>: Retrieve the (raw) contents of the named xattr</li>
<li>
<code>get_xattr_size</code>: Retrieve the size (bytes) of the named xattr</li>
<li>
<code>has_xattrs</code>: Test if a target path has xattrs</li>
<li>
<code>is_bplist</code>: Tests whether a raw vector is really a binary plist</li>
<li>
<code>list_xattrs</code>: List extended attribute names of a target path</li>
<li>
<code>read_bplist</code>: Convert binary plist to something usable in R</li>
</ul>
</div>
<div id="installation" class="section level2">
<h2 class="hasAnchor">
<a href="#installation" class="anchor"></a>Installation</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1">devtools<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/devtools/topics/install_github">install_github</a></span>(<span class="st">"hrbrmstr/xattrs"</span>)</a></code></pre></div>
</div>
<div id="usage" class="section level2">
<h2 class="hasAnchor">
<a href="#usage" class="anchor"></a>Usage</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="kw">library</span>(xattrs)</a>
<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="kw">library</span>(tidyverse)</a>
<a class="sourceLine" id="cb2-3" data-line-number="3"></a>
<a class="sourceLine" id="cb2-4" data-line-number="4"><span class="co"># current verison</span></a>
<a class="sourceLine" id="cb2-5" data-line-number="5"><span class="kw">packageVersion</span>(<span class="st">"xattrs"</span>)</a>
<a class="sourceLine" id="cb2-6" data-line-number="6">## [1] '0.1.0'</a></code></pre></div>
<div id="basic-operation" class="section level3">
<h3 class="hasAnchor">
<a href="#basic-operation" class="anchor"></a>Basic Operation</h3>
<p>Extended attributes seem to get stripped when R builds pkgs so until I can figure out an easy way not to do that, just find any file on your system that has an <code>@</code> next to the permissions string in an <code>ls -l</code> directory listing.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1">sample_file &lt;-<span class="st"> "~/Downloads/Elementary-Lunch-Menu.pdf"</span></a>
<a class="sourceLine" id="cb3-2" data-line-number="2"></a>
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="kw"><a href="reference/list_xattrs.html">list_xattrs</a></span>(sample_file)</a>
<a class="sourceLine" id="cb3-4" data-line-number="4">## character(0)</a>
<a class="sourceLine" id="cb3-5" data-line-number="5"></a>
<a class="sourceLine" id="cb3-6" data-line-number="6"><span class="kw"><a href="reference/get_xattr_size.html">get_xattr_size</a></span>(sample_file, <span class="st">"com.apple.metadata:kMDItemWhereFroms"</span>)</a>
<a class="sourceLine" id="cb3-7" data-line-number="7">## [1] 0</a></code></pre></div>
<p>Extended attributes can be <em>anything</em> so it makes alot of sense to work with the contents as a raw vector:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="kw"><a href="reference/get_xattr_raw.html">get_xattr_raw</a></span>(sample_file, <span class="st">"com.apple.metadata:kMDItemWhereFroms"</span>)</a>
<a class="sourceLine" id="cb4-2" data-line-number="2">## raw(0)</a></code></pre></div>
<p>There is a “string” version of the function, but it may return “nothing” if there are embedded NULLs or other breaking characters in the contents:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="kw"><a href="reference/get_xattr.html">get_xattr</a></span>(sample_file, <span class="st">"com.apple.metadata:kMDItemWhereFroms"</span>)</a>
<a class="sourceLine" id="cb5-2" data-line-number="2">## character(0)</a></code></pre></div>
<p>You are really better off doing this if you really want a raw string conversion:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="kw">readBin</span>(<span class="kw"><a href="reference/get_xattr_raw.html">get_xattr_raw</a></span>(sample_file, <span class="st">"com.apple.metadata:kMDItemWhereFroms"</span>), <span class="st">"character"</span>)</a>
<a class="sourceLine" id="cb6-2" data-line-number="2">## [1] ""</a></code></pre></div>
<p>More often than not (on macOS) extended attributes are “binary property lists” (or “binary plist” for short). You can test to see if the returned raw vector is likely a binary plist:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="kw"><a href="reference/is_bplist.html">is_bplist</a></span>(<span class="kw"><a href="reference/get_xattr_raw.html">get_xattr_raw</a></span>(sample_file, <span class="st">"com.apple.metadata:kMDItemWhereFroms"</span>))</a>
<a class="sourceLine" id="cb7-2" data-line-number="2">## [1] FALSE</a></code></pre></div>
<p>If it is, you can get the data out of it. For now, this makes a system call to <code>plutil</code> on macOS and <code>plistutil</code> on other systems. You’ll be given a hint on how to install <code>plistutil</code> if it’s not found.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="kw"><a href="reference/read_bplist.html">read_bplist</a></span>(<span class="kw"><a href="reference/get_xattr_raw.html">get_xattr_raw</a></span>(sample_file, <span class="st">"com.apple.metadata:kMDItemWhereFroms"</span>))</a>
<a class="sourceLine" id="cb8-2" data-line-number="2">## [[1]]</a>
<a class="sourceLine" id="cb8-3" data-line-number="3">## [1] NA</a></code></pre></div>
<p>This is R, so you should really consider doing this instead of any of the above #rectanglesrule:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="kw"><a href="reference/get_xattr_df.html">get_xattr_df</a></span>(sample_file)</a>
<a class="sourceLine" id="cb9-2" data-line-number="2">## # A tibble: 0 x 3</a>
<a class="sourceLine" id="cb9-3" data-line-number="3">## # ... with 3 variables: name &lt;chr&gt;, size &lt;dbl&gt;, contents &lt;list&gt;</a></code></pre></div>
<p>you can live dangerously even with data frames, tho:</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="kw"><a href="reference/get_xattr_df.html">get_xattr_df</a></span>(sample_file) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb10-2" data-line-number="2"><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">txt =</span> <span class="kw">map_chr</span>(contents, readBin, <span class="st">"character"</span>)) <span class="co"># potentially "dangerous"</span></a>
<a class="sourceLine" id="cb10-3" data-line-number="3">## # A tibble: 0 x 4</a>
<a class="sourceLine" id="cb10-4" data-line-number="4">## # ... with 4 variables: name &lt;chr&gt;, size &lt;dbl&gt;, contents &lt;list&gt;, txt &lt;chr&gt;</a></code></pre></div>
</div>
<div id="extended-example" class="section level3">
<h3 class="hasAnchor">
<a href="#extended-example" class="anchor"></a>Extended Example</h3>
<p>We can process a whole directory of files to see what extended attributes various path targets have:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" data-line-number="1">fils &lt;-<span class="st"> </span><span class="kw">list.files</span>(<span class="st">"~/Downloads"</span>, <span class="dt">full.names =</span> <span class="ot">TRUE</span>) </a>
<a class="sourceLine" id="cb11-2" data-line-number="2"></a>
<a class="sourceLine" id="cb11-3" data-line-number="3">xdf &lt;-<span class="st"> </span><span class="kw">map_df</span>(<span class="kw">set_names</span>(fils, fils), get_xattr_df, <span class="dt">.id=</span><span class="st">"path"</span>)</a>
<a class="sourceLine" id="cb11-4" data-line-number="4"></a>
<a class="sourceLine" id="cb11-5" data-line-number="5"><span class="kw">count</span>(xdf, name, <span class="dt">sort=</span><span class="ot">TRUE</span>) </a>
<a class="sourceLine" id="cb11-6" data-line-number="6">## # A tibble: 5 x 2</a>
<a class="sourceLine" id="cb11-7" data-line-number="7">## name n</a>
<a class="sourceLine" id="cb11-8" data-line-number="8">## &lt;chr&gt; &lt;int&gt;</a>
<a class="sourceLine" id="cb11-9" data-line-number="9">## 1 com.apple.metadata:kMDItemWhereFroms 9</a>
<a class="sourceLine" id="cb11-10" data-line-number="10">## 2 com.apple.quarantine 9</a>
<a class="sourceLine" id="cb11-11" data-line-number="11">## 3 com.apple.lastuseddate#PS 4</a>
<a class="sourceLine" id="cb11-12" data-line-number="12">## 4 com.apple.diskimages.fsck 1</a>
<a class="sourceLine" id="cb11-13" data-line-number="13">## 5 com.apple.diskimages.recentcksum 1</a></code></pre></div>
<p>And we can work with <code>com.apple.metadata:kMDItemWhereFroms</code> binary plist data in bulk:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1"><span class="kw">filter</span>(xdf, name <span class="op">==</span><span class="st"> "com.apple.metadata:kMDItemWhereFroms"</span>) <span class="op">%&gt;%</span></a>
<a class="sourceLine" id="cb12-2" data-line-number="2"><span class="st"> </span><span class="kw">filter</span>(<span class="kw">map_lgl</span>(contents, is_bplist)) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb12-3" data-line-number="3"><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">converted =</span> <span class="kw">map</span>(contents, read_bplist)) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb12-4" data-line-number="4"><span class="st"> </span><span class="kw">select</span>(size, converted) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb12-5" data-line-number="5"><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">converted =</span> <span class="kw">map</span>(converted, <span class="op">~</span><span class="kw">flatten_chr</span>(.x<span class="op">$</span>plist<span class="op">$</span>array<span class="op">$</span>string))) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb12-6" data-line-number="6"><span class="st"> </span><span class="kw">unnest</span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb12-7" data-line-number="7"><span class="st"> </span><span class="kw">mutate</span>(<span class="dt">converted =</span> urltools<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/urltools/topics/domain">domain</a></span>(converted)) <span class="co"># you don't rly need to see the full URLs for this example</span></a>
<a class="sourceLine" id="cb12-8" data-line-number="8">## # A tibble: 9 x 2</a>
<a class="sourceLine" id="cb12-9" data-line-number="9">## size converted </a>
<a class="sourceLine" id="cb12-10" data-line-number="10">## &lt;dbl&gt; &lt;chr&gt; </a>
<a class="sourceLine" id="cb12-11" data-line-number="11">## 1 110 arxiv.org </a>
<a class="sourceLine" id="cb12-12" data-line-number="12">## 2 116 128.84.21.199 </a>
<a class="sourceLine" id="cb12-13" data-line-number="13">## 3 86 arxiv.org </a>
<a class="sourceLine" id="cb12-14" data-line-number="14">## 4 104 arxiv.org </a>
<a class="sourceLine" id="cb12-15" data-line-number="15">## 5 86 arxiv.org </a>
<a class="sourceLine" id="cb12-16" data-line-number="16">## 6 132 docs.aws.amazon.com </a>
<a class="sourceLine" id="cb12-17" data-line-number="17">## 7 161 nms.lcs.mit.edu </a>
<a class="sourceLine" id="cb12-18" data-line-number="18">## 8 161 osquery-packages.s3.amazonaws.com</a>
<a class="sourceLine" id="cb12-19" data-line-number="19">## 9 172 s3.amazonaws.com</a></code></pre></div>
</div>
<div id="full-suite" class="section level3">
<h3 class="hasAnchor">
<a href="#full-suite" class="anchor"></a>Full Suite</h3>
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" data-line-number="1"><span class="co"># Create a temp file for the example</span></a>
<a class="sourceLine" id="cb13-2" data-line-number="2">tf &lt;-<span class="st"> </span><span class="kw">tempfile</span>(<span class="dt">fileext =</span> <span class="st">".csv"</span>)</a>
<a class="sourceLine" id="cb13-3" data-line-number="3"><span class="kw">write.csv</span>(mtcars, tf)</a>
<a class="sourceLine" id="cb13-4" data-line-number="4"></a>
<a class="sourceLine" id="cb13-5" data-line-number="5"><span class="co"># has attributes? (shld be FALSE)</span></a>
<a class="sourceLine" id="cb13-6" data-line-number="6"><span class="kw"><a href="reference/has_xattrs.html">has_xattrs</a></span>(tf)</a>
<a class="sourceLine" id="cb13-7" data-line-number="7">## [1] FALSE</a>
<a class="sourceLine" id="cb13-8" data-line-number="8"><span class="kw"><a href="reference/get_xattr.html">get_xattr</a></span>(tf, <span class="st">"is.rud.setting"</span>)</a>
<a class="sourceLine" id="cb13-9" data-line-number="9">## character(0)</a>
<a class="sourceLine" id="cb13-10" data-line-number="10"></a>
<a class="sourceLine" id="cb13-11" data-line-number="11"><span class="co"># set an attribute</span></a>
<a class="sourceLine" id="cb13-12" data-line-number="12"><span class="kw"><a href="reference/set_xattr.html">set_xattr</a></span>(tf, <span class="st">"is.rud.setting.a"</span>, <span class="st">"first attribut"</span>)</a>
<a class="sourceLine" id="cb13-13" data-line-number="13"><span class="kw"><a href="reference/get_xattr.html">get_xattr</a></span>(tf, <span class="st">"is.rud.setting.a"</span>)</a>
<a class="sourceLine" id="cb13-14" data-line-number="14">## [1] "first attribut"</a>
<a class="sourceLine" id="cb13-15" data-line-number="15"><span class="kw"><a href="reference/get_xattr_size.html">get_xattr_size</a></span>(tf, <span class="st">"is.rud.setting.a"</span>)</a>
<a class="sourceLine" id="cb13-16" data-line-number="16">## [1] 14</a>
<a class="sourceLine" id="cb13-17" data-line-number="17"></a>
<a class="sourceLine" id="cb13-18" data-line-number="18"><span class="co"># shld be TRUE</span></a>
<a class="sourceLine" id="cb13-19" data-line-number="19"><span class="kw"><a href="reference/has_xattrs.html">has_xattrs</a></span>(tf)</a>
<a class="sourceLine" id="cb13-20" data-line-number="20">## [1] TRUE</a>
<a class="sourceLine" id="cb13-21" data-line-number="21"></a>
<a class="sourceLine" id="cb13-22" data-line-number="22"><span class="kw"><a href="reference/set_xattr.html">set_xattr</a></span>(tf, <span class="st">"is.rud.setting.b"</span>, <span class="st">"second attribute"</span>)</a>
<a class="sourceLine" id="cb13-23" data-line-number="23"><span class="kw"><a href="reference/get_xattr.html">get_xattr</a></span>(tf, <span class="st">"is.rud.setting.b"</span>)</a>
<a class="sourceLine" id="cb13-24" data-line-number="24">## [1] "second attribute"</a>
<a class="sourceLine" id="cb13-25" data-line-number="25"><span class="kw"><a href="reference/get_xattr_size.html">get_xattr_size</a></span>(tf, <span class="st">"is.rud.setting.b"</span>)</a>
<a class="sourceLine" id="cb13-26" data-line-number="26">## [1] 16</a>
<a class="sourceLine" id="cb13-27" data-line-number="27"></a>
<a class="sourceLine" id="cb13-28" data-line-number="28"><span class="co"># overwrite an attribute</span></a>
<a class="sourceLine" id="cb13-29" data-line-number="29"><span class="kw"><a href="reference/set_xattr.html">set_xattr</a></span>(tf, <span class="st">"is.rud.setting.a"</span>, <span class="st">"first attribute"</span>)</a>
<a class="sourceLine" id="cb13-30" data-line-number="30"><span class="kw"><a href="reference/get_xattr.html">get_xattr</a></span>(tf, <span class="st">"is.rud.setting.a"</span>)</a>
<a class="sourceLine" id="cb13-31" data-line-number="31">## [1] "first attribute"</a>
<a class="sourceLine" id="cb13-32" data-line-number="32"><span class="kw"><a href="reference/get_xattr_size.html">get_xattr_size</a></span>(tf, <span class="st">"is.rud.setting.a"</span>)</a>
<a class="sourceLine" id="cb13-33" data-line-number="33">## [1] 15</a>
<a class="sourceLine" id="cb13-34" data-line-number="34"></a>
<a class="sourceLine" id="cb13-35" data-line-number="35"><span class="co"># see all the attributes</span></a>
<a class="sourceLine" id="cb13-36" data-line-number="36"><span class="kw"><a href="reference/list_xattrs.html">list_xattrs</a></span>(tf)</a>
<a class="sourceLine" id="cb13-37" data-line-number="37">## [1] "is.rud.setting.a" "is.rud.setting.b"</a>
<a class="sourceLine" id="cb13-38" data-line-number="38"></a>
<a class="sourceLine" id="cb13-39" data-line-number="39"><span class="co"># data frame vs individual functions</span></a>
<a class="sourceLine" id="cb13-40" data-line-number="40"><span class="kw"><a href="reference/get_xattr_df.html">get_xattr_df</a></span>(tf)</a>
<a class="sourceLine" id="cb13-41" data-line-number="41">## # A tibble: 2 x 3</a>
<a class="sourceLine" id="cb13-42" data-line-number="42">## name size contents </a>
<a class="sourceLine" id="cb13-43" data-line-number="43">## &lt;chr&gt; &lt;dbl&gt; &lt;list&gt; </a>
<a class="sourceLine" id="cb13-44" data-line-number="44">## 1 is.rud.setting.a 15 &lt;raw [15]&gt;</a>
<a class="sourceLine" id="cb13-45" data-line-number="45">## 2 is.rud.setting.b 16 &lt;raw [16]&gt;</a>
<a class="sourceLine" id="cb13-46" data-line-number="46"></a>
<a class="sourceLine" id="cb13-47" data-line-number="47"><span class="co"># remove attribute</span></a>
<a class="sourceLine" id="cb13-48" data-line-number="48"><span class="kw"><a href="reference/rm_xattr.html">rm_xattr</a></span>(tf, <span class="st">"is.rud.setting"</span>)</a>
<a class="sourceLine" id="cb13-49" data-line-number="49"><span class="kw"><a href="reference/get_xattr.html">get_xattr</a></span>(tf, <span class="st">"is.rud.setting"</span>)</a>
<a class="sourceLine" id="cb13-50" data-line-number="50">## character(0)</a>
<a class="sourceLine" id="cb13-51" data-line-number="51"></a>
<a class="sourceLine" id="cb13-52" data-line-number="52"><span class="co"># cleanup</span></a>
<a class="sourceLine" id="cb13-53" data-line-number="53"><span class="kw">unlink</span>(tf)</a></code></pre></div>
</div>
</div>
<div id="code-of-conduct" class="section level2">
<h2 class="hasAnchor">
<a href="#code-of-conduct" class="anchor"></a>Code of Conduct</h2>
<p>Please note that this project is released with a <a href="CONDUCT.html">Contributor Code of Conduct</a>. By participating in this project you agree to abide by its terms.</p>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div class="links">
<h2>Links</h2>
<ul class="list-unstyled">
<li>Browse source code at <br><a href="https://github.com/hrbrmstr/xattrs">https://​github.com/​hrbrmstr/​xattrs</a>
</li>
<li>Report a bug at <br><a href="https://github.com/hrbrmstr/xattrs/issues">https://​github.com/​hrbrmstr/​xattrs/​issues</a>
</li>
</ul>
</div>
<div class="license">
<h2>License</h2>
<ul class="list-unstyled">
<li>
<a href="https://opensource.org/licenses/mit-license.php">MIT</a> + file <a href="LICENSE-text.html">LICENSE</a>
</li>
</ul>
</div>
<div class="developers">
<h2>Developers</h2>
<ul class="list-unstyled">
<li>Bob Rudis <br><small class="roles"> Author, maintainer </small> <a href="https://orcid.org/0000-0001-5670-2640" target="orcid.widget"><img src="https://members.orcid.org/sites/default/files/vector_iD_icon.svg" class="orcid" height="16"></a> </li>
<li>Brandon Fosdick <br><small class="roles"> Author </small> <br><small>(extattr.h C++ library)</small>
</li>
</ul>
</div>
</div>
</div>
<footer><div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

11
docs/jquery.sticky-kit.min.js

@ -0,0 +1,11 @@
/* Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | */
/*
Source: https://github.com/leafo/sticky-kit
License: MIT
*/
(function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k));
if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("<div />"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q,
u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),e<F&&(m=!1,c=q,null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),
h.detach()),b={position:"",width:"",top:""},a.css(b).removeClass(t).trigger("sticky_kit:unstick")),B&&(b=f.height(),u+q>b&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}),
a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize",
y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n<K;n++)d=this[n],J(b(d));return this}}).call(this);

12
docs/link.svg

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
<style type="text/css">
.st0{fill:#75AADB;}
</style>
<path class="st0" d="M4,11.3h1.3v1.3H4c-2,0-4-2.3-4-4.7s2.1-4.7,4-4.7h5.3c1.9,0,4,2.3,4,4.7c0,1.9-1.2,3.6-2.7,4.3v-1.5
C11.4,10.2,12,9.1,12,8c0-1.7-1.4-3.3-2.7-3.3H4C2.7,4.7,1.3,6.3,1.3,8S2.7,11.3,4,11.3z M16,7.3h-1.3v1.3H16c1.3,0,2.7,1.6,2.7,3.3
s-1.4,3.3-2.7,3.3h-5.3C9.4,15.3,8,13.7,8,12c0-1.1,0.6-2.2,1.3-2.8V7.7C7.9,8.4,6.7,10.1,6.7,12c0,2.4,2.1,4.7,4,4.7H16
c1.9,0,4-2.3,4-4.7S18,7.3,16,7.3z"/>
</svg>

After

Width:  |  Height:  |  Size: 810 B

129
docs/news/index.html

@ -0,0 +1,129 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Changelog • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Changelog" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-news">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Changelog <small></small></h1>
<small>Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
</ul>
</div>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

227
docs/pkgdown.css

@ -0,0 +1,227 @@
/* Sticky footer */
/**
* Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
* Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css
*
* .Site -> body > .container
* .Site-content -> body > .container .row
* .footer -> footer
*
* Key idea seems to be to ensure that .container and __all its parents__
* have height set to 100%
*
*/
html, body {
height: 100%;
}
body > .container {
display: flex;
height: 100%;
flex-direction: column;
padding-top: 60px;
}
body > .container .row {
flex: 1 0 auto;
}
footer {
margin-top: 45px;
padding: 35px 0 36px;
border-top: 1px solid #e5e5e5;
color: #666;
display: flex;
flex-shrink: 0;
}
footer p {
margin-bottom: 0;
}
footer div {
flex: 1;
}
footer .pkgdown {
text-align: right;
}
footer p {
margin-bottom: 0;
}
img.icon {
float: right;
}
img {
max-width: 100%;
}
/* Typographic tweaking ---------------------------------*/
.contents h1.page-header {
margin-top: calc(-60px + 1em);
}
/* Section anchors ---------------------------------*/
a.anchor {
margin-left: -30px;
display:inline-block;
width: 30px;
height: 30px;
visibility: hidden;
background-image: url(./link.svg);
background-repeat: no-repeat;
background-size: 20px 20px;
background-position: center center;
}
.hasAnchor:hover a.anchor {
visibility: visible;
}
@media (max-width: 767px) {
.hasAnchor:hover a.anchor {
visibility: hidden;
}
}
/* Fixes for fixed navbar --------------------------*/
.contents h1, .contents h2, .contents h3, .contents h4 {
padding-top: 60px;
margin-top: -40px;
}
/* Static header placement on mobile devices */
@media (max-width: 767px) {
.navbar-fixed-top {
position: absolute;
}
.navbar {
padding: 0;
}
}
/* Sidebar --------------------------*/
#sidebar {
margin-top: 30px;
}
#sidebar h2 {
font-size: 1.5em;
margin-top: 1em;
}
#sidebar h2:first-child {
margin-top: 0;
}
#sidebar .list-unstyled li {
margin-bottom: 0.5em;
}
.orcid {
height: 16px;
vertical-align: middle;
}
/* Reference index & topics ----------------------------------------------- */
.ref-index th {font-weight: normal;}
.ref-index td {vertical-align: top;}
.ref-index .alias {width: 40%;}
.ref-index .title {width: 60%;}
.ref-index .alias {width: 40%;}
.ref-index .title {width: 60%;}
.ref-arguments th {text-align: right; padding-right: 10px;}
.ref-arguments th, .ref-arguments td {vertical-align: top;}
.ref-arguments .name {width: 20%;}
.ref-arguments .desc {width: 80%;}
/* Nice scrolling for wide elements --------------------------------------- */
table {
display: block;
overflow: auto;
}
/* Syntax highlighting ---------------------------------------------------- */
pre {
word-wrap: normal;
word-break: normal;
border: 1px solid #eee;
}
pre, code {
background-color: #f8f8f8;
color: #333;
}
pre code {
overflow: auto;
word-wrap: normal;
white-space: pre;
}
pre .img {
margin: 5px 0;
}
pre .img img {
background-color: #fff;
display: block;
height: auto;
}
code a, pre a {
color: #375f84;
}
a.sourceLine:hover {
text-decoration: none;
}
.fl {color: #1514b5;}
.fu {color: #000000;} /* function */
.ch,.st {color: #036a07;} /* string */
.kw {color: #264D66;} /* keyword */
.co {color: #888888;} /* comment */
.message { color: black; font-weight: bolder;}
.error { color: orange; font-weight: bolder;}
.warning { color: #6A0366; font-weight: bolder;}
/* Clipboard --------------------------*/
.hasCopyButton {
position: relative;
}
.btn-copy-ex {
position: absolute;
right: 0;
top: 0;
visibility: hidden;
}
.hasCopyButton:hover button.btn-copy-ex {
visibility: visible;
}
/* mark.js ----------------------------*/
mark {
background-color: rgba(255, 255, 51, 0.5);
border-bottom: 2px solid rgba(255, 153, 51, 0.3);
padding: 1px;
}

174
docs/pkgdown.js

@ -0,0 +1,174 @@
$(function() {
$("#sidebar")
.stick_in_parent({offset_top: 40})
.on('sticky_kit:bottom', function(e) {
$(this).parent().css('position', 'static');
})
.on('sticky_kit:unbottom', function(e) {
$(this).parent().css('position', 'relative');
});
$('body').scrollspy({
target: '#sidebar',
offset: 60
});
$('[data-toggle="tooltip"]').tooltip();
var cur_path = paths(location.pathname);
$("#navbar ul li a").each(function(index, value) {
if (value.text == "Home")
return;
if (value.getAttribute("href") === "#")
return;
var path = paths(value.pathname);
if (is_prefix(cur_path, path)) {
// Add class to parent <li>, and enclosing <li> if in dropdown
var menu_anchor = $(value);
menu_anchor.parent().addClass("active");
menu_anchor.closest("li.dropdown").addClass("active");
}
});
});
$(document).ready(function() {
// do keyword highlighting
/* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */
var mark = function() {
var referrer = document.URL ;
var paramKey = "q" ;
if (referrer.indexOf("?") !== -1) {
var qs = referrer.substr(referrer.indexOf('?') + 1);
var qs_noanchor = qs.split('#')[0];
var qsa = qs_noanchor.split('&');
var keyword = "";
for (var i = 0; i < qsa.length; i++) {
var currentParam = qsa[i].split('=');
if (currentParam.length !== 2) {
continue;
}
if (currentParam[0] == paramKey) {
keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20"));
}
}
if (keyword !== "") {
$(".contents").unmark({
done: function() {
$(".contents").mark(keyword);
}
});
}
}
};
mark();
});
function paths(pathname) {
var pieces = pathname.split("/");
pieces.shift(); // always starts with /
var end = pieces[pieces.length - 1];
if (end === "index.html" || end === "")
pieces.pop();
return(pieces);
}
function is_prefix(needle, haystack) {
if (needle.length > haystack.lengh)
return(false);
// Special case for length-0 haystack, since for loop won't run
if (haystack.length === 0) {
return(needle.length === 0);
}
for (var i = 0; i < haystack.length; i++) {
if (needle[i] != haystack[i])
return(false);
}
return(true);
}
/* Clipboard --------------------------*/
function changeTooltipMessage(element, msg) {
var tooltipOriginalTitle=element.getAttribute('data-original-title');
element.setAttribute('data-original-title', msg);
$(element).tooltip('show');
element.setAttribute('data-original-title', tooltipOriginalTitle);
}
if(Clipboard.isSupported()) {
$(document).ready(function() {
var copyButton = "<button type='button' class='btn btn-primary btn-copy-ex' type = 'submit' title='Copy to clipboard' aria-hidden='true' data-toggle='tooltip' data-placement='left auto' data-trigger='hover' data-clipboard-copy><i class='fa fa-copy' aria-hidden='true'></i></button>";
$(".examples").addClass("hasCopyButton");
// Insert copy buttons:
$(copyButton).prependTo(".hasCopyButton");
// Initialize tooltips:
$('.btn-copy-ex').tooltip({container: 'body'});
// Initialize clipboard:
var clipboardBtnCopies = new Clipboard('[data-clipboard-copy]', {
text: function(trigger) {
return trigger.parentNode.textContent;
}
});
clipboardBtnCopies.on('success', function(e) {
changeTooltipMessage(e.trigger, 'Copied!');
e.clearSelection();
});
clipboardBtnCopies.on('error', function() {
changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy');
});
});
}
/* Search term highlighting ------------------------------*/
function matchedWords(hit) {
var words = [];
var hierarchy = hit._highlightResult.hierarchy;
// loop to fetch from lvl0, lvl1, etc.
for (var idx in hierarchy) {
words = words.concat(hierarchy[idx].matchedWords);
}
var content = hit._highlightResult.content;
if (content) {
words = words.concat(content.matchedWords);
}
// return unique words
var words_uniq = [...new Set(words)];
return words_uniq;
}
function updateHitURL(hit) {
var words = matchedWords(hit);
var url = "";
if (hit.anchor) {
url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor;
} else {
url = hit.url + '?q=' + escape(words.join(" "));
}
return url;
}

5
docs/pkgdown.yml

@ -0,0 +1,5 @@
pandoc: '2.2'
pkgdown: 1.0.0
pkgdown_sha: ~
articles: []

195
docs/reference/get_xattr.html

@ -0,0 +1,195 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Retrieve the contents of the named xattr — get_xattr • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Retrieve the contents of the named xattr — get_xattr" />
<meta property="og:description" content="Retrieve the contents of the named xattr" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Retrieve the contents of the named xattr</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/RcppExports.R'><code>R/RcppExports.R</code></a></small>
<div class="hidden name"><code>get_xattr.Rd</code></div>
</div>
<div class="ref-description">
<p>Retrieve the contents of the named xattr</p>
</div>
<pre class="usage"><span class='fu'>get_xattr</span>(<span class='no'>path</span>, <span class='no'>name</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>path</th>
<td><p>target path (file or dir); this is auto-expanded</p></td>
</tr>
<tr>
<th>name</th>
<td><p>xattr name to retrieve</p></td>
</tr>
<tr>
<th>follow_symlinks</th>
<td><p>if <code>FALSE</code> get xattr of the symlink vs the target it references</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
<p>You should really use <code><a href='get_xattr_raw.html'>get_xattr_raw()</a></code></p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Create a temp file for the example</span>
<span class='no'>tf</span> <span class='kw'>&lt;-</span> <span class='fu'>tempfile</span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".csv"</span>)
<span class='fu'>write.csv</span>(<span class='no'>mtcars</span>, <span class='no'>tf</span>)
<span class='co'># has attributes? (shld be FALSE)</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='fu'>get_xattr</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># set an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribut"</span>)
<span class='fu'>get_xattr</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribut"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 14</div><div class='input'>
<span class='co'># shld be TRUE</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>, <span class='st'>"second attribute"</span>)
<span class='fu'>get_xattr</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] "second attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] 16</div><div class='input'>
<span class='co'># overwrite an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribute"</span>)
<span class='fu'>get_xattr</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 15</div><div class='input'>
<span class='co'># see all the attributes</span>
<span class='fu'><a href='list_xattrs.html'>list_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] "is.rud.setting.a" "is.rud.setting.b"</div><div class='input'>
<span class='co'># data frame vs individual functions</span>
<span class='fu'><a href='get_xattr_df.html'>get_xattr_df</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; # A tibble: 2 x 3
#&gt; name size contents
#&gt; &lt;chr&gt; &lt;dbl&gt; &lt;list&gt;
#&gt; 1 is.rud.setting.a 15 &lt;raw [15]&gt;
#&gt; 2 is.rud.setting.b 16 &lt;raw [16]&gt;</div><div class='input'>
<span class='co'># remove attribute</span>
<span class='fu'><a href='rm_xattr.html'>rm_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)
<span class='fu'>get_xattr</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># cleanup</span>
<span class='fu'>unlink</span>(<span class='no'>tf</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#note">Note</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

187
docs/reference/get_xattr_df.html

@ -0,0 +1,187 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Retrieve a data frame of xattr names, sizes and (raw) contents for a target path — get_xattr_df • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Retrieve a data frame of xattr names, sizes and (raw) contents for a target path — get_xattr_df" />
<meta property="og:description" content="Retrieve a data frame of xattr names, sizes and (raw) contents for a target path" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Retrieve a data frame of xattr names, sizes and (raw) contents for a target path</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/df.R'><code>R/df.R</code></a></small>
<div class="hidden name"><code>get_xattr_df.Rd</code></div>
</div>
<div class="ref-description">
<p>Retrieve a data frame of xattr names, sizes and (raw) contents for a target path</p>
</div>
<pre class="usage"><span class='fu'>get_xattr_df</span>(<span class='no'>path</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'>read_xattrs</span>(<span class='no'>path</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>path</th>
<td><p>path target path (file or dir); this is auto-expanded</p></td>
</tr>
<tr>
<th>follow_symlinks</th>
<td><p>if <code>FALSE</code> get xattr of the symlink vs the target it references</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Create a temp file for the example</span>
<span class='no'>tf</span> <span class='kw'>&lt;-</span> <span class='fu'>tempfile</span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".csv"</span>)
<span class='fu'>write.csv</span>(<span class='no'>mtcars</span>, <span class='no'>tf</span>)
<span class='co'># has attributes? (shld be FALSE)</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># set an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribut"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribut"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 14</div><div class='input'>
<span class='co'># shld be TRUE</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>, <span class='st'>"second attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] "second attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] 16</div><div class='input'>
<span class='co'># overwrite an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 15</div><div class='input'>
<span class='co'># see all the attributes</span>
<span class='fu'><a href='list_xattrs.html'>list_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] "is.rud.setting.a" "is.rud.setting.b"</div><div class='input'>
<span class='co'># data frame vs individual functions</span>
<span class='fu'>get_xattr_df</span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; # A tibble: 2 x 3
#&gt; name size contents
#&gt; &lt;chr&gt; &lt;dbl&gt; &lt;list&gt;
#&gt; 1 is.rud.setting.a 15 &lt;raw [15]&gt;
#&gt; 2 is.rud.setting.b 16 &lt;raw [16]&gt;</div><div class='input'>
<span class='co'># remove attribute</span>
<span class='fu'><a href='rm_xattr.html'>rm_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># cleanup</span>
<span class='fu'>unlink</span>(<span class='no'>tf</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

189
docs/reference/get_xattr_raw.html

@ -0,0 +1,189 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Retrieve the (raw) contents of the named xattr — get_xattr_raw • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Retrieve the (raw) contents of the named xattr — get_xattr_raw" />
<meta property="og:description" content="Retrieve the (raw) contents of the named xattr" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Retrieve the (raw) contents of the named xattr</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/RcppExports.R'><code>R/RcppExports.R</code></a></small>
<div class="hidden name"><code>get_xattr_raw.Rd</code></div>
</div>
<div class="ref-description">
<p>Retrieve the (raw) contents of the named xattr</p>
</div>
<pre class="usage"><span class='fu'>get_xattr_raw</span>(<span class='no'>path</span>, <span class='no'>name</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>path</th>
<td><p>target path (file or dir); this is auto-expanded</p></td>
</tr>
<tr>
<th>name</th>
<td><p>xattr name to retrieve</p></td>
</tr>
<tr>
<th>follow_symlinks</th>
<td><p>if <code>FALSE</code> get xattr of the symlink vs the target it references</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Create a temp file for the example</span>
<span class='no'>tf</span> <span class='kw'>&lt;-</span> <span class='fu'>tempfile</span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".csv"</span>)
<span class='fu'>write.csv</span>(<span class='no'>mtcars</span>, <span class='no'>tf</span>)
<span class='co'># has attributes? (shld be FALSE)</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># set an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribut"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribut"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 14</div><div class='input'>
<span class='co'># shld be TRUE</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>, <span class='st'>"second attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] "second attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] 16</div><div class='input'>
<span class='co'># overwrite an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 15</div><div class='input'>
<span class='co'># see all the attributes</span>
<span class='fu'><a href='list_xattrs.html'>list_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] "is.rud.setting.a" "is.rud.setting.b"</div><div class='input'>
<span class='co'># data frame vs individual functions</span>
<span class='fu'><a href='get_xattr_df.html'>get_xattr_df</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; # A tibble: 2 x 3
#&gt; name size contents
#&gt; &lt;chr&gt; &lt;dbl&gt; &lt;list&gt;
#&gt; 1 is.rud.setting.a 15 &lt;raw [15]&gt;
#&gt; 2 is.rud.setting.b 16 &lt;raw [16]&gt;</div><div class='input'>
<span class='co'># remove attribute</span>
<span class='fu'><a href='rm_xattr.html'>rm_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># cleanup</span>
<span class='fu'>unlink</span>(<span class='no'>tf</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

189
docs/reference/get_xattr_size.html

@ -0,0 +1,189 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Retrieve the size (bytes) of the named xattr — get_xattr_size • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Retrieve the size (bytes) of the named xattr — get_xattr_size" />
<meta property="og:description" content="Retrieve the size (bytes) of the named xattr" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Retrieve the size (bytes) of the named xattr</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/RcppExports.R'><code>R/RcppExports.R</code></a></small>
<div class="hidden name"><code>get_xattr_size.Rd</code></div>
</div>
<div class="ref-description">
<p>Retrieve the size (bytes) of the named xattr</p>
</div>
<pre class="usage"><span class='fu'>get_xattr_size</span>(<span class='no'>path</span>, <span class='no'>name</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>path</th>
<td><p>target path (file or dir); this is auto-expanded</p></td>
</tr>
<tr>
<th>name</th>
<td><p>xattr name to retrieve</p></td>
</tr>
<tr>
<th>follow_symlinks</th>
<td><p>if <code>FALSE</code> get xattr of the symlink vs the target it references</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Create a temp file for the example</span>
<span class='no'>tf</span> <span class='kw'>&lt;-</span> <span class='fu'>tempfile</span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".csv"</span>)
<span class='fu'>write.csv</span>(<span class='no'>mtcars</span>, <span class='no'>tf</span>)
<span class='co'># has attributes? (shld be FALSE)</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># set an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribut"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribut"</div><div class='input'><span class='fu'>get_xattr_size</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 14</div><div class='input'>
<span class='co'># shld be TRUE</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>, <span class='st'>"second attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] "second attribute"</div><div class='input'><span class='fu'>get_xattr_size</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] 16</div><div class='input'>
<span class='co'># overwrite an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribute"</div><div class='input'><span class='fu'>get_xattr_size</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 15</div><div class='input'>
<span class='co'># see all the attributes</span>
<span class='fu'><a href='list_xattrs.html'>list_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] "is.rud.setting.a" "is.rud.setting.b"</div><div class='input'>
<span class='co'># data frame vs individual functions</span>
<span class='fu'><a href='get_xattr_df.html'>get_xattr_df</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; # A tibble: 2 x 3
#&gt; name size contents
#&gt; &lt;chr&gt; &lt;dbl&gt; &lt;list&gt;
#&gt; 1 is.rud.setting.a 15 &lt;raw [15]&gt;
#&gt; 2 is.rud.setting.b 16 &lt;raw [16]&gt;</div><div class='input'>
<span class='co'># remove attribute</span>
<span class='fu'><a href='rm_xattr.html'>rm_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># cleanup</span>
<span class='fu'>unlink</span>(<span class='no'>tf</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

185
docs/reference/has_xattrs.html

@ -0,0 +1,185 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test if a target path has xattrs — has_xattrs • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Test if a target path has xattrs — has_xattrs" />
<meta property="og:description" content="Test if a target path has xattrs" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Test if a target path has xattrs</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/RcppExports.R'><code>R/RcppExports.R</code></a></small>
<div class="hidden name"><code>has_xattrs.Rd</code></div>
</div>
<div class="ref-description">
<p>Test if a target path has xattrs</p>
</div>
<pre class="usage"><span class='fu'>has_xattrs</span>(<span class='no'>path</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>path</th>
<td><p>target path (file or dir); this is auto-expanded</p></td>
</tr>
<tr>
<th>follow_symlinks</th>
<td><p>if <code>FALSE</code> get xattr of the symlink vs the target it references</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Create a temp file for the example</span>
<span class='no'>tf</span> <span class='kw'>&lt;-</span> <span class='fu'>tempfile</span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".csv"</span>)
<span class='fu'>write.csv</span>(<span class='no'>mtcars</span>, <span class='no'>tf</span>)
<span class='co'># has attributes? (shld be FALSE)</span>
<span class='fu'>has_xattrs</span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># set an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribut"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribut"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 14</div><div class='input'>
<span class='co'># shld be TRUE</span>
<span class='fu'>has_xattrs</span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>, <span class='st'>"second attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] "second attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] 16</div><div class='input'>
<span class='co'># overwrite an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 15</div><div class='input'>
<span class='co'># see all the attributes</span>
<span class='fu'><a href='list_xattrs.html'>list_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] "is.rud.setting.a" "is.rud.setting.b"</div><div class='input'>
<span class='co'># data frame vs individual functions</span>
<span class='fu'><a href='get_xattr_df.html'>get_xattr_df</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; # A tibble: 2 x 3
#&gt; name size contents
#&gt; &lt;chr&gt; &lt;dbl&gt; &lt;list&gt;
#&gt; 1 is.rud.setting.a 15 &lt;raw [15]&gt;
#&gt; 2 is.rud.setting.b 16 &lt;raw [16]&gt;</div><div class='input'>
<span class='co'># remove attribute</span>
<span class='fu'><a href='rm_xattr.html'>rm_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># cleanup</span>
<span class='fu'>unlink</span>(<span class='no'>tf</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

209
docs/reference/index.html

@ -0,0 +1,209 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Function reference • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Function reference" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-index">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Reference</h1>
</div>
<table class="ref-index">
<colgroup>
<col class="alias" />
<col class="title" />
</colgroup>
<tbody>
<tr>
<th colspan="2">
<h2 id="section-all-functions" class="hasAnchor"><a href="#section-all-functions" class="anchor"></a>All functions</h2>
<p class="section-desc"></p>
</th>
</tr>
<tr>
<!-- -->
<td>
<p><code><a href="get_xattr.html">get_xattr()</a></code> </p>
</td>
<td><p>Retrieve the contents of the named xattr</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="get_xattr_df.html">get_xattr_df()</a></code> <code><a href="get_xattr_df.html">read_xattrs()</a></code> </p>
</td>
<td><p>Retrieve a data frame of xattr names, sizes and (raw) contents for a target path</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="get_xattr_raw.html">get_xattr_raw()</a></code> </p>
</td>
<td><p>Retrieve the (raw) contents of the named xattr</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="get_xattr_size.html">get_xattr_size()</a></code> </p>
</td>
<td><p>Retrieve the size (bytes) of the named xattr</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="has_xattrs.html">has_xattrs()</a></code> </p>
</td>
<td><p>Test if a target path has xattrs</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="is_bplist.html">is_bplist()</a></code> </p>
</td>
<td><p>Tests whether a raw vector is really a binary plist</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="list_xattrs.html">list_xattrs()</a></code> </p>
</td>
<td><p>List extended attribute names of a target path</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="read_bplist.html">read_bplist()</a></code> </p>
</td>
<td><p>Convert binary plist to something usable in R</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="rm_xattr.html">rm_xattr()</a></code> <code><a href="rm_xattr.html">remove_xattr()</a></code> </p>
</td>
<td><p>Remove an extended attribute</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="set_xattr.html">set_xattr()</a></code> </p>
</td>
<td><p>Set or modify an extended attribute</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="xattrs.html">xattrs</a></code> </p>
</td>
<td><p>Work With Filesystem Object Extended Attributes</p></td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#section-all-functions">All functions</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

149
docs/reference/is_bplist.html

@ -0,0 +1,149 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tests whether a raw vector is really a binary plist — is_bplist • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Tests whether a raw vector is really a binary plist — is_bplist" />
<meta property="og:description" content="Tests whether a raw vector is really a binary plist" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Tests whether a raw vector is really a binary plist</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/read-bplist.R'><code>R/read-bplist.R</code></a></small>
<div class="hidden name"><code>is_bplist.Rd</code></div>
</div>
<div class="ref-description">
<p>Tests whether a raw vector is really a binary plist</p>
</div>
<pre class="usage"><span class='fu'>is_bplist</span>(<span class='no'>rawv</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>rawv</th>
<td><p>raw vector to test</p></td>
</tr>
</table>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

185
docs/reference/list_xattrs.html

@ -0,0 +1,185 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>List extended attribute names of a target path — list_xattrs • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="List extended attribute names of a target path — list_xattrs" />
<meta property="og:description" content="List extended attribute names of a target path" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>List extended attribute names of a target path</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/RcppExports.R'><code>R/RcppExports.R</code></a></small>
<div class="hidden name"><code>list_xattrs.Rd</code></div>
</div>
<div class="ref-description">
<p>List extended attribute names of a target path</p>
</div>
<pre class="usage"><span class='fu'>list_xattrs</span>(<span class='no'>path</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>path</th>
<td><p>target path (file or dir); this is auto-expanded</p></td>
</tr>
<tr>
<th>follow_symlinks</th>
<td><p>if <code>FALSE</code> get xattr of the symlink vs the target it references</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Create a temp file for the example</span>
<span class='no'>tf</span> <span class='kw'>&lt;-</span> <span class='fu'>tempfile</span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".csv"</span>)
<span class='fu'>write.csv</span>(<span class='no'>mtcars</span>, <span class='no'>tf</span>)
<span class='co'># has attributes? (shld be FALSE)</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># set an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribut"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribut"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 14</div><div class='input'>
<span class='co'># shld be TRUE</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>, <span class='st'>"second attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] "second attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] 16</div><div class='input'>
<span class='co'># overwrite an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 15</div><div class='input'>
<span class='co'># see all the attributes</span>
<span class='fu'>list_xattrs</span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] "is.rud.setting.a" "is.rud.setting.b"</div><div class='input'>
<span class='co'># data frame vs individual functions</span>
<span class='fu'><a href='get_xattr_df.html'>get_xattr_df</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; # A tibble: 2 x 3
#&gt; name size contents
#&gt; &lt;chr&gt; &lt;dbl&gt; &lt;list&gt;
#&gt; 1 is.rud.setting.a 15 &lt;raw [15]&gt;
#&gt; 2 is.rud.setting.b 16 &lt;raw [16]&gt;</div><div class='input'>
<span class='co'># remove attribute</span>
<span class='fu'><a href='rm_xattr.html'>rm_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># cleanup</span>
<span class='fu'>unlink</span>(<span class='no'>tf</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

139
docs/reference/pipe.html

@ -0,0 +1,139 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pipe operator — %&gt;% • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Pipe operator — %&gt;%" />
<meta property="og:description" content="See magrittr::%&gt;% for details." />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Pipe operator</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/utils-pipe.R'><code>R/utils-pipe.R</code></a></small>
<div class="hidden name"><code>pipe.Rd</code></div>
</div>
<div class="ref-description">
<p>See <code>magrittr::%&gt;%</code> for details.</p>
</div>
<pre class="usage"><span class='no'>lhs</span> <span class='kw'>%&gt;%</span> <span class='no'>rhs</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

155
docs/reference/read_bplist.html

@ -0,0 +1,155 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Convert binary plist to something usable in R — read_bplist • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Convert binary plist to something usable in R — read_bplist" />
<meta property="og:description" content="Convert binary plist to something usable in R" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Convert binary plist to something usable in R</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/read-bplist.R'><code>R/read-bplist.R</code></a></small>
<div class="hidden name"><code>read_bplist.Rd</code></div>
</div>
<div class="ref-description">
<p>Convert binary plist to something usable in R</p>
</div>
<pre class="usage"><span class='fu'>read_bplist</span>(<span class='no'>raw_bplist</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>raw_bplist</th>
<td><p>raw vector containing the contents of a binary plist</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p><code>list</code></p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

191
docs/reference/rm_xattr.html

@ -0,0 +1,191 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Remove an extended attribute — rm_xattr • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Remove an extended attribute — rm_xattr" />
<meta property="og:description" content="Remove an extended attribute" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Remove an extended attribute</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/rm.R'><code>R/rm.R</code></a></small>
<div class="hidden name"><code>rm_xattr.Rd</code></div>
</div>
<div class="ref-description">
<p>Remove an extended attribute</p>
</div>
<pre class="usage"><span class='fu'>rm_xattr</span>(<span class='no'>path</span>, <span class='no'>name</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'>remove_xattr</span>(<span class='no'>path</span>, <span class='no'>name</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>path</th>
<td><p>target path (file or dir); this is auto-expanded</p></td>
</tr>
<tr>
<th>name</th>
<td><p>xattr name to retrieve</p></td>
</tr>
<tr>
<th>follow_symlinks</th>
<td><p>if <code>FALSE</code> get xattr of the symlink vs the target it references</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Create a temp file for the example</span>
<span class='no'>tf</span> <span class='kw'>&lt;-</span> <span class='fu'>tempfile</span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".csv"</span>)
<span class='fu'>write.csv</span>(<span class='no'>mtcars</span>, <span class='no'>tf</span>)
<span class='co'># has attributes? (shld be FALSE)</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># set an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribut"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribut"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 14</div><div class='input'>
<span class='co'># shld be TRUE</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>, <span class='st'>"second attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] "second attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] 16</div><div class='input'>
<span class='co'># overwrite an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 15</div><div class='input'>
<span class='co'># see all the attributes</span>
<span class='fu'><a href='list_xattrs.html'>list_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] "is.rud.setting.a" "is.rud.setting.b"</div><div class='input'>
<span class='co'># data frame vs individual functions</span>
<span class='fu'><a href='get_xattr_df.html'>get_xattr_df</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; # A tibble: 2 x 3
#&gt; name size contents
#&gt; &lt;chr&gt; &lt;dbl&gt; &lt;list&gt;
#&gt; 1 is.rud.setting.a 15 &lt;raw [15]&gt;
#&gt; 2 is.rud.setting.b 16 &lt;raw [16]&gt;</div><div class='input'>
<span class='co'># remove attribute</span>
<span class='fu'>rm_xattr</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># cleanup</span>
<span class='fu'>unlink</span>(<span class='no'>tf</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

193
docs/reference/set_xattr.html

@ -0,0 +1,193 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Set or modify an extended attribute — set_xattr • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Set or modify an extended attribute — set_xattr" />
<meta property="og:description" content="Set or modify an extended attribute" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Set or modify an extended attribute</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/set.R'><code>R/set.R</code></a></small>
<div class="hidden name"><code>set_xattr.Rd</code></div>
</div>
<div class="ref-description">
<p>Set or modify an extended attribute</p>
</div>
<pre class="usage"><span class='fu'>set_xattr</span>(<span class='no'>path</span>, <span class='no'>name</span>, <span class='no'>value</span>, <span class='kw'>follow_symlinks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>path</th>
<td><p>target path (file or dir); this is auto-expanded</p></td>
</tr>
<tr>
<th>name</th>
<td><p>xattr name to retrieve</p></td>
</tr>
<tr>
<th>value</th>
<td><p>raw vector of value to set</p></td>
</tr>
<tr>
<th>follow_symlinks</th>
<td><p>if <code>FALSE</code> get xattr of the symlink vs the target it references</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Create a temp file for the example</span>
<span class='no'>tf</span> <span class='kw'>&lt;-</span> <span class='fu'>tempfile</span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".csv"</span>)
<span class='fu'>write.csv</span>(<span class='no'>mtcars</span>, <span class='no'>tf</span>)
<span class='co'># has attributes? (shld be FALSE)</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># set an attribute</span>
<span class='fu'>set_xattr</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribut"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribut"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 14</div><div class='input'>
<span class='co'># shld be TRUE</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'>set_xattr</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>, <span class='st'>"second attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] "second attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] 16</div><div class='input'>
<span class='co'># overwrite an attribute</span>
<span class='fu'>set_xattr</span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 15</div><div class='input'>
<span class='co'># see all the attributes</span>
<span class='fu'><a href='list_xattrs.html'>list_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] "is.rud.setting.a" "is.rud.setting.b"</div><div class='input'>
<span class='co'># data frame vs individual functions</span>
<span class='fu'><a href='get_xattr_df.html'>get_xattr_df</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; # A tibble: 2 x 3
#&gt; name size contents
#&gt; &lt;chr&gt; &lt;dbl&gt; &lt;list&gt;
#&gt; 1 is.rud.setting.a 15 &lt;raw [15]&gt;
#&gt; 2 is.rud.setting.b 16 &lt;raw [16]&gt;</div><div class='input'>
<span class='co'># remove attribute</span>
<span class='fu'><a href='rm_xattr.html'>rm_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># cleanup</span>
<span class='fu'>unlink</span>(<span class='no'>tf</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

178
docs/reference/xattrs.html

@ -0,0 +1,178 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Work With Filesystem Object Extended Attributes — xattrs • xattrs</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Work With Filesystem Object Extended Attributes — xattrs" />
<meta property="og:description" content="Filesystem path target extended attributes store extra, customizable, small bits of
info. For example, author name, file character encoding, short comments, security
status, etc. Methods are provided to list, extract and work with these attributes." />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">xattrs</a>
<span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/hrbrmstr/xattrs">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Work With Filesystem Object Extended Attributes</h1>
<small class="dont-index">Source: <a href='https://github.com/hrbrmstr/xattrs/blob/master/R/xattrs-package.R'><code>R/xattrs-package.R</code></a></small>
<div class="hidden name"><code>xattrs.Rd</code></div>
</div>
<div class="ref-description">
<p>Filesystem path target extended attributes store extra, customizable, small bits of
info. For example, author name, file character encoding, short comments, security
status, etc. Methods are provided to list, extract and work with these attributes.</p>
</div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Create a temp file for the example</span>
<span class='no'>tf</span> <span class='kw'>&lt;-</span> <span class='fu'>tempfile</span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".csv"</span>)
<span class='fu'>write.csv</span>(<span class='no'>mtcars</span>, <span class='no'>tf</span>)
<span class='co'># has attributes? (shld be FALSE)</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] FALSE</div><div class='input'><span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># set an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribut"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribut"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 14</div><div class='input'>
<span class='co'># shld be TRUE</span>
<span class='fu'><a href='has_xattrs.html'>has_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>, <span class='st'>"second attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] "second attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.b"</span>)</div><div class='output co'>#&gt; [1] 16</div><div class='input'>
<span class='co'># overwrite an attribute</span>
<span class='fu'><a href='set_xattr.html'>set_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>, <span class='st'>"first attribute"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] "first attribute"</div><div class='input'><span class='fu'><a href='get_xattr_size.html'>get_xattr_size</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting.a"</span>)</div><div class='output co'>#&gt; [1] 15</div><div class='input'>
<span class='co'># see all the attributes</span>
<span class='fu'><a href='list_xattrs.html'>list_xattrs</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; [1] "is.rud.setting.a" "is.rud.setting.b"</div><div class='input'>
<span class='co'># data frame vs individual functions</span>
<span class='fu'><a href='get_xattr_df.html'>get_xattr_df</a></span>(<span class='no'>tf</span>)</div><div class='output co'>#&gt; # A tibble: 2 x 3
#&gt; name size contents
#&gt; &lt;chr&gt; &lt;dbl&gt; &lt;list&gt;
#&gt; 1 is.rud.setting.a 15 &lt;raw [15]&gt;
#&gt; 2 is.rud.setting.b 16 &lt;raw [16]&gt;</div><div class='input'>
<span class='co'># remove attribute</span>
<span class='fu'><a href='rm_xattr.html'>rm_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)
<span class='fu'><a href='get_xattr.html'>get_xattr</a></span>(<span class='no'>tf</span>, <span class='st'>"is.rud.setting"</span>)</div><div class='output co'>#&gt; character(0)</div><div class='input'>
<span class='co'># cleanup</span>
<span class='fu'>unlink</span>(<span class='no'>tf</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#examples">Examples</a></li>
</ul>
<h2>Author</h2>
Bob Rudis (bob@rud.is)
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Bob Rudis, Brandon Fosdick.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
</body>
</html>

3
man/get_xattr_df.Rd

@ -2,9 +2,12 @@
% Please edit documentation in R/df.R
\name{get_xattr_df}
\alias{get_xattr_df}
\alias{read_xattrs}
\title{Retrieve a data frame of xattr names, sizes and (raw) contents for a target path}
\usage{
get_xattr_df(path, follow_symlinks = TRUE)
read_xattrs(path, follow_symlinks = TRUE)
}
\arguments{
\item{path}{path target path (file or dir); this is auto-expanded}

Loading…
Cancel
Save