是否可以注册多点文件扩展名? [英] Is it possible to register a multi-dotted file extension?

查看:57
本文介绍了是否可以注册多点文件扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的应用程序中,我们有一个像这样的文件扩展名:

In our application, we have a file extension like this:

filename.applicationName.zip  

现在我想注册它的文件扩展名

Now I want to register its file extension

.applicationName.zip

问:这可能吗?

(我知道如何注册文件扩展名,这不是重点)

(I know how to register file extensions, that's not the point here)

推荐答案

扩展名被定义为出现在文件名中最后一个点之后的字符.文件扩展名由简单的文本处理决定.您从文件名的末尾开始向后走,直到找到一个点.

An extension is defined to be the characters that appear after the final dot in the filename. The file extension is determined by simple text processing. You start at the end of the filename and walk backwards until you find a dot.

以您的示例为例,filename.applicationName.zip 的文件扩展名是 zip.您可能认为文件的扩展名是 applicationName.zip 但系统不是.重要的是系统规则.

Using your example, the file extension of filename.applicationName.zip is zip. You might think that the extension of your file is applicationName.zip but the system does not. And it's the system's rules that count.

因此,文件扩展名不能包含点.因此,虽然您可以使用点注册文件扩展名,但系统永远不会将任何文件识别为与您的扩展名匹配.

Thus, a file extension cannot contain a dot. And so, whilst you could register a file extension with a dot, the system would never recognise any file as matching your extension.

这篇关于是否可以注册多点文件扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆