Comments (4)
from boxr.
Hi @rrpaleja
In your example below, are you reading the file folder1/folder2/temp_file.csv
via the BoxURL or via the box folder that might be mounted/synched on your laptop?
Hello! Is there a function to read a file using the Box file path? E.g. if the file path is "folder1/folder2/temp_file.csv"
I didn't see one and wrote a quick recursive function to get the file ID from a file path:
library(data.table) file_path <- 'folder1/folder2/temp_file.csv' split_file_path <- strsplit(file_path, "/")[[1]] dir_id_last = box_getwd() for (i in seq(1,length(split_file_path))) { ls_list <- box_ls(dir_id = dir_id_last, limit = 1000, fields = 'name') dir_id_last <- rbindlist(ls_list)[name == split_file_path[i], id] }
There is probably a better (more efficient and cleaner) way to create this function. Do you think this is something that could be implemented?
Thanks
from boxr.
This use case sounds like it would be suited to {boxrdrive}: https://github.com/r-box/boxrdrive - it is based on the path rather than the folder_id.
from boxr.
Hello. Loving this package, by the way.
I'm looking for the same thing here (specifically, passing a file path to box_ul()
and box_dl()
). Would there be any interest in me making a PR if I get an implementation that I like? If so, any tips or gotchas to consider in the implementation?
Also, would there be other functions beyond box_ul()
, box_dl()
(and probably box_ls()
) that you would think should have this option?
from boxr.
Related Issues (20)
- Authenticate with a developer token HOT 4
- SSL Error when authenticating to Enterprise Box
- rio's upcoming removal of several options
- Best way to use service app with automation (e.g. GitHub Actions)?
- View and download contents of a shared link
- refactor: use `inherits()` rather than string-comparison
- ci: update Actions
- chore: update maintainer email
- refactor: move away from gargle deprecated functions
- chore: switch to main branch from master
- refactor: box id as character only HOT 1
- test: activate tests for "load and save"
- docs: update procedure for interactive apps
- chore: remove internal function `forRCMDCheck()`
- refactor: remove `data.frame` coercion in `box_read()`
- test: update to testthat 3e
- ci: update to use `actions/checkout@v4`
- box_fetch() downloads directory folder structure, but doesn't download files
- Unable to Create a FOLDER in BOX from R
- Unneccessary check for non-ASCII filenames should be removed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boxr.