Skip to content

Commit

Permalink
add file.size()
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Aug 2, 2024
1 parent 3c27d8e commit 8b33c3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,6 @@ if (!exists('trimws', baseenv(), inherits = TRUE)) trimws = function(x, which =
r = c(both = '^\\s+|\\s+$', right = '\\s+$', left = '^\\s+')[which]
gsub(r, '', x)
}
if (!exists('file.size', baseenv(), inherits = TRUE)) file.size = function(...) {
file.info(...)$size
}

0 comments on commit 8b33c3d

Please sign in to comment.