file-like
- adjective
- Specialized
- Many libraries accept any file-like object providing read and seek methods instead of a real file.
Examples
-
In Python, a file-like object can be passed to libraries expecting an open file for reading.
-
To test streaming code, she created a file-like buffer that simulated network input and errors.
-
This object is file-like.
-
This file-like interface is very user-friendly.
-
In Python, a file-like object can be used with functions that require an open file for reading and writing.
-
To test her application, she implemented a file-like stream that mimicked file operations during processing.
-
When using the library, you can provide any file-like object that supports standard read, write, and seek methods.
Surface Forms
Morphology
Etymology
File-like combines the computer word file and the ending -like, meaning 'similar to'. A computer file is a place where data is kept and opened to 'read' or 'write', so a 'file-like' object behaves like a real file and can be used the same way.