-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WISH: Simple class for files / pathnames #9
Comments
|
Need to keep the notions of path (File) and stream (connection) distinct. We Also, the path represents a low-level format, but the stream might have richer semantics. For example, an HDF5 file might be represented by an |
@lawremi Path versus stream is a useful distinction; sometimes its useful to create a stream without opening it, or to have a stream that exists in a state where it can be opened after being closed. Hence |
And what potentially intrigues me would be filetype-specific classes that would allow method dispatch. I'm mainly think about this for data import/export (in the context of rio), but I can imagine there might be other contexts, such as calling graphics devices based on file type without the need for |
It would be useful to have a class for files (e.g.
File
) and basic functions for creating objects of such classes. I can imagine that this file class is a simple extension ofcharacter
, because that is currently how files/pathnames are currently represented, e.g.Then existing functions returning files/pathnames, e.g.
and instead of
c()
users can have, say,p()
for very brief syntax, e.g.p <- File
.Examples:
The text was updated successfully, but these errors were encountered: