摘要 |
Implementations for determining whether a file contains code without opening the file. A file has a file extension that includes an indication of whether the file is to be code-free. In addition, the file contains an indicator (e.g., a content-type) that provides an indication of whether the file is to be code-free. Before opening the file, the file extension and the content-type are inspected to determine whether the file is to be opened. Also, a file that contains indications of being code-free but in fact includes code is prevented from being saved (or "saved-as") Before saving the file, an application can inspect the aforementioned file extension and content-type to determine whether the file is being indicated as a code-free and then scan the file to determine if the file contains code to make sure that the code-free indications are accurate.
|