Home  >  Article  >  What file types can be identified based on

What file types can be identified based on

青灯夜游
青灯夜游Original
2022-07-19 16:45:0139677browse

The type of file can be identified based on the "file extension". File extension is a mechanism, or symbol, used by the operating system to mark file types; the extension is almost an essential part of every file. If a file does not have an extension, the operating system cannot identify the file and cannot distinguish it. What type does it belong to, so it is impossible to determine which software to use to process this file.

What file types can be identified based on

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

The type of file can be identified based on the "file extension".

File format (or file type) refers to the special encoding method used by computers to store information, and is used to identify internally stored data. For example, some store pictures, some store programs, and some store text information. Each type of information can be saved in computer storage in one or more file formats. Each file format will usually have one or more extensions by which it can be identified, but it may also have no extension. The extension helps applications identify the file format.

Filename Extension Also known as the suffix of a file, it is a mechanism used by operating systems (such as VMS/CP/M/DOS, etc.) to mark file types. , or symbol.

What file types can be identified based on

The file extension refers to the sequence of letters after the last period (.) in the file name. For example, HTML files are identified by the .htm or .html extension; GIF graphic files are identified by the .gif extension.

Extensions are an essential part of almost every file. If a file does not have an extension, the operating system cannot identify the file, what type it belongs to, and thus cannot determine which software to use to process the file.

In a file name like "example.txt", example is the file main name, txt is the file extension, indicating that the file is a plain text file, and the period "." is the file main name and file extension. Name delimiter.

The more important role of the file extension is to let the system decide which software to use when the user wants to open the file.

One characteristic of the extension method is that changing the file extension will cause the system to misjudge the file format. For example, simply changing the filename .html to filename .txt will cause the system to mistakenly recognize the HTML file as plain text. Although some skilled users can take advantage of this feature, ordinary users can easily make mistakes when renaming, rendering the file unusable. Therefore, some modern operating system management programs, such as Windows Explorer, have added the function of limiting the file extensions displayed to the user.

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What file types can be identified based on. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn