what is the difference between file and random access file?
相关问题
- Problems reading and writing to a text file in C#
- How do I delete a record from my random access fil
- MacOS sandboxed application: access files without
- Rails - Show A Random Record But Not The Current
- Random-access container that does not fit in memor
相关文章
- RandomAccess Interface, Why no methods?
- Android Q : java.io.FileNotFoundException: /proc/s
- C# Application can't read/write to files creat
- Read a file while it's being written
- File access count in Linux
- Reaching a specific line in a file using RandomAcc
- Working with Direct Access Files in C++
- Access to “Program Files” folder needed
Almost nothing these days. There used to be a time in certain operating systems where there were different types of files - some of which could be accessed randomly (at any point in the file) and others which could only be accessed sequentially. This made more sense when you were using a sequential medium such as tape. Any file system worth its salt these days only supports random access.
A random access file is a file where you can "jump" to anywhere within it without having to read sequentially until the position you are interested in.
For example, say you have a 1MB file, and you are interested in 5 bytes that start after 100k of data. A random access file will allow you to "jump" to the 100k-th position in one operation. A non-random access file will require you to read 100k bytes first, and only then read the data you're interested in.
Hope that helps.
Clarification: this description is language-agnostic and does not relate to any specific file wrapper in any specific language/framework.