Skip to main content
file-like

file-like

1 5.8
An object programs can read from, write to, and move inside like an open file
  • adjective
  • Specialized
: similar a un archivo
  • 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

file-like positive

Morphology

file-like = file (transparent) = file + like

In computing contexts the adjectival meaning 'behaving like a file' is a direct extension of 'file' plus the productive suffix '-like', so the relation is straightforward for learners familiar with file operations.

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.