CN104156666A - Method and device for adding color attributes into filename extensions to distinguish file types - Google Patents

Method and device for adding color attributes into filename extensions to distinguish file types Download PDF

Info

Publication number
CN104156666A
CN104156666A CN201410395870.3A CN201410395870A CN104156666A CN 104156666 A CN104156666 A CN 104156666A CN 201410395870 A CN201410395870 A CN 201410395870A CN 104156666 A CN104156666 A CN 104156666A
Authority
CN
China
Prior art keywords
file
extension name
color
filename
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410395870.3A
Other languages
Chinese (zh)
Inventor
成军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201410395870.3A priority Critical patent/CN104156666A/en
Publication of CN104156666A publication Critical patent/CN104156666A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • G06F16/166File name conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and device for adding color attributes into filename extensions to distinguish file types. The method comprises the following steps that a file type color list is built and at least comprises corresponding filename extensions, file types and marking colors; when a file in a file system is displayed, the filename of the file is read, and the filename extension of the file is recognized from the filename; the file type color list is searched, the corresponding marking color of the file type is given to the filename extension of the file and is drawn on a screen. After the method and device for adding the color attributes into the filename extensions to distinguish the file types are applied, when meeting too many files or some unfamiliar file types, a user can visually know the file type of the file according to the color of the filename extension and does not need to click, open and acknowledge the file or carry out other acknowledgement attempts, operation is convenient for the user, and user experience is improved.

Description

File extension adds color attribute to distinguish method and the device of file type
Technical field
The present invention relates to computing machine and portable device technology field, more particularly, relate to a kind of file extension and add color attribute to distinguish method and the device of file type.
Background technology
In the operating system of view (as traditional windows system, portable device system etc.), often need to the file of file system be browsed or be operated.Wherein, the filename of file is conventionally with extension name (being suffix name), if .bmp .mp3 etc. are to distinguish file type (picture category, text class, music class etc.).In file system, during browser document, normally with extension name or thumbnail, distinguish file type, but thumbnail often can be changed by some relative programs, or can not clearly distinguish; And by checking that extension name can not intuitively find out when file is more, and a lot of extension name is not familiar for user, this causes user often can not see intuitively the type of outfile, affects user's operation.
Summary of the invention
The object of the invention is to overcome above-mentioned defect of the prior art, provide a kind of file extension to add color attribute to distinguish method and the device of file type, it can allow user know intuitively the type of file, is convenient to user's operation and promotes user experience.
For achieving the above object, technical scheme provided by the invention is as follows: a kind of file extension adds color attribute to distinguish the method for file type, comprises the following steps:
Create a file type color table, in described file type color table, at least include extension name, file type and marker color in correspondence with each other;
During file in display file system, read the filename of described file, and from this document name, identify the extension name of file;
Inquire about described file type color table, for the extension name of described file is given the marker color of corresponding document type, and be plotted on screen.
As preferably, in technique scheme, described in read the filename of described file, and the step that identifies the extension name of file from this document name specifically comprises:
Read the filename of described file, the extension name using the character string after this document name last ". " number as file.
As preferably, in technique scheme, describedly give the marker color of corresponding document type for the extension name of described file, and the step being plotted on screen specifically comprises:
The extension name of described file is split from the filename of described file;
The marker color of the file type corresponding with extension name described file that find out from described file type color table is added in the extension name of described file;
After having added, the extension name of described file is plotted on screen.
As preferably, in technique scheme, during file after the step of a file type color table of described establishment and in display file system, read the filename of described file, and also comprised identify the step of extension name of file from this document name before:
Spare interface, for adding voluntarily or revise extension name, file type or marker color to user at described file type color table.
As preferably, in technique scheme, during file in display file system, calling system drawing interface is plotted to the filename of described file on screen, and the important name of described filename is partly used system default color.
As preferably, in technique scheme, described interface comprises user interface.
As preferably, in technique scheme, described file type comprises common file type and non-common file type.
The present invention also provides a kind of file extension to add color attribute to distinguish the device of file type, comprising:
Form creation module, for creating file type color table, at least includes extension name, file type and marker color in correspondence with each other in described file type color table;
Extension name identification module, during for file when display file system, reads the filename of described file, and from this document name, identifies the extension name of file;
Table lookup module, for inquiring about described file type color table;
Extension name color is added module, is used to the extension name of described file to give the marker color of corresponding document type, and is plotted on screen.
As preferably, in technique scheme, described extension name identification module is further used for reading the filename of described file, the extension name using the character string after this document name last ". " number as file.
As preferably, in technique scheme, described extension name color is added module and is further comprised:
Filename is cut apart module, for the extension name of described file is split from the filename of described file;
Color is added module, for adding to the extension name of described file from the marker color of the described file type color table file type corresponding with extension name described file that find out, and after interpolation completes, the extension name of described file is plotted on screen.
As preferably, in technique scheme, described form creation module is reserved with interface, for add voluntarily or revise extension name, file type or marker color to user at described file type color table.
Compared with prior art, beneficial effect of the present invention is:
The present invention is by creating a file type color table, during file in display file system, read the filename of described file, and from this document name, identify the extension name of file, then inquire about described file type color table, for the extension name of described file is given the marker color of corresponding document type, and be plotted on screen, after using the present invention, when running into while having compared with multifile or some not familiar file types, user can know the file type of this document intuitively by the color of extension name, and do not need to click to open, do not confirm or do other to attempt confirming, it is convenient to user's operation and promotes user experience.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is that a kind of file extension that the embodiment of the present invention one provides adds color attribute to distinguish the process flow diagram of the method for file type;
Fig. 2 is that a kind of file extension that the embodiment of the present invention two provides adds color attribute to distinguish the functional block diagram of the device of file type;
Fig. 3 is that the extension name color that the embodiment of the present invention two provides is added the structured flowchart of module.
Embodiment
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment mono-
Embodiments of the invention one provide a kind of file extension to add color attribute to distinguish the method for file type, below in conjunction with accompanying drawing, the present embodiment are elaborated.
Fig. 1 is the method flow diagram of the embodiment of the present invention one, please refer to Fig. 1, and the method for the embodiment of the present invention comprises the following steps:
Step S11, a file type color table of establishment, at least include extension name, file type and marker color in correspondence with each other in described file type color table;
Concrete, described file type color table can create in file management application, after having created, is kept in database.
Described file type comprises common file type and non-common file type, as types such as: picture category, music class, video class, encryption type (compression), text, executable file or other.
For example, described file type color table is as shown in Table 1:
Table one:
Extension name File type Marker color
png Picture Blue
jpg Picture Blue
jpeg Picture Blue
... ... ...
mp3 Music Green
ogg Music Green
In addition, in another embodiment, after creating the step of a file type color table, can also comprise the following steps: spare interface, for adding voluntarily or revise extension name, file type or marker color at described file type color table to user.
Wherein, described interface can be for offering user's operation interface.User can, by the operation interface of file system software, come to add or revised context for form.For example, user can pass through operation interface, and the color that is picture by file type, changes purple into by blueness, and this process is equivalent to by blueness, change the color of corresponding picture/mb-type in database (form) into purple.
When step S12, the file in display file system, read the filename of described file, and from this document name, identify the extension name of file;
General, the filename of file is partly comprised of important name part and extension name, and primary filename is comprised of 1~8 character, extension name is comprised of 1~3 character, between important name and extension name, by a dot, separated, be commonly referred to as 8.3 rules, as: ffs.exe, 139545.bmp etc.
Further, the detailed step of described step S12 is: during file in display file system, read the filename of described file, the extension name using the character string after this document name last ". " number as file.At this, it should be noted that, also can there is ". " number in the important name of filename part, and therefore, the character string after filename last ". " number is only the extension name of file.
Step S13, inquire about described file type color table;
In this enforcement, after the extension name that identifies file, can from file type color table, find out corresponding marker color, as shown in Table 1, if the expansion of file jpg by name, the corresponding file type of this extension name is picture category so, thereby determines that the color of this extension name is blue.
Step S14, give the marker color of corresponding document type for the extension name of described file, and be plotted on screen.
Wherein, step S14 further can comprise the following steps:
Step S141, the extension name of described file is split from the filename of described file;
Step S142, the marker color of the file type corresponding with extension name described file that find out from described file type color table is added in the extension name of described file;
Step S143, added after, the extension name of described file is plotted on screen.
During file in display file system, can the filename of described file be plotted on screen calling system drawing interface.In the prior art, the important name of filename part and extension name are all used system default color, and common is black.And in this enforcement, the extension name that is file by step S14 is added after color, the important name of filename is partly used system default color to draw word, and the extension name of file is drawn word by the color matching.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, described program can be in being stored in a computer read/write memory medium, described storage medium, as ROM/RAM, disk, CD etc.
Embodiment bis-
Embodiments of the invention two provide a kind of file extension to add color attribute to distinguish the device of file type, please refer to Fig. 2, the device of the embodiment of the present invention comprises form creation module 21, extension name identification module 22, table lookup module 23 and extension name color interpolation module 24, will be described in detail modules below.
Form creation module 21, for creating file type color table;
Wherein, in described file type color table, at least include extension name, file type and marker color in correspondence with each other.After establishment completes, this document types of colors table can be kept in database.
Described file type comprises common file type and non-common file type, as types such as: picture category, music class, video class, encryption type (compression), text, executable file or other.
In another is implemented, described form creation module is reserved with interface, for add voluntarily or revise extension name, file type or marker color to user at described file type color table.
Extension name identification module 22, during for file when display file system, reads the filename of described file, and from this document name, identifies the extension name of file;
Described extension name identification module 22 is further used for reading the filename of described file, the extension name using the character string after this document name last ". " number as file.
Table lookup module 23, for inquiring about described file type color table;
Extension name color is added module 24, is used to the extension name of described file to give the marker color of corresponding document type, and is plotted on screen;
As shown in Figure 3, described extension name color interpolation module 24 further comprises:
Filename is cut apart module 241, for the extension name of described file is split from the filename of described file;
Color is added module 242, for adding to the extension name of described file from the marker color of the described file type color table file type corresponding with extension name described file that find out, and after interpolation completes, the extension name of described file is plotted on screen.
It should be noted that, a kind of file extension that above-described embodiment provides adds color attribute to distinguish the device of file type, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and by different functional modules, completed as required, the inner structure of the system of being about to is divided into different functional modules, to complete all or part of function described above.In addition, this device can be applied in the terminal devices such as computing machine, mobile phone, panel computer, human-computer interaction terminal.
In sum, after using method and apparatus of the present invention, when running into while having compared with multifile or some not familiar file types, user can know the file type of this document intuitively by the color of extension name, and do not need to click to open, do not confirm or do other to attempt confirming, it is convenient to user's operation and promotes user experience.In addition, by method and apparatus of the present invention, can, for some system file marker colors (as: redness) are with reminding user, avoid user to delete by mistake, thereby affect performance and the operation of system.
Above-described embodiment is preferably embodiment of the present invention; but embodiments of the present invention are not restricted to the described embodiments; other any do not deviate from change, the modification done under Spirit Essence of the present invention and principle, substitutes, combination, simplify; all should be equivalent substitute mode, within being included in protection scope of the present invention.

Claims (11)

1. file extension adds color attribute to distinguish a method for file type, it is characterized in that, the method comprises the following steps:
Create a file type color table, in described file type color table, at least include extension name, file type and marker color in correspondence with each other;
During file in display file system, read the filename of described file, and from this document name, identify the extension name of file;
Inquire about described file type color table, for the extension name of described file is given the marker color of corresponding document type, and be plotted on screen.
2. method according to claim 1, is characterized in that, described in read the filename of described file, and the step that identifies the extension name of file from this document name specifically comprises:
Read the filename of described file, the extension name using the character string after this document name last ". " number as file.
3. method according to claim 1, is characterized in that, describedly gives the marker color of corresponding document type for the extension name of described file, and the step being plotted on screen specifically comprises:
The extension name of described file is split from the filename of described file;
The marker color of the file type corresponding with extension name described file that find out from described file type color table is added in the extension name of described file;
After having added, the extension name of described file is plotted on screen.
4. method according to claim 1, it is characterized in that, during file after the step of a file type color table of described establishment and in display file system, read the filename of described file, and also comprised identify the step of extension name of file from this document name before:
Spare interface, for adding voluntarily or revise extension name, file type or marker color to user at described file type color table.
5. method according to claim 1, is characterized in that, during file in display file system, calling system drawing interface is plotted to the filename of described file on screen, and the important name of described filename is partly used system default color.
6. method according to claim 4, is characterized in that, described interface comprises user interface.
7. method according to claim 1, is characterized in that, described file type comprises common file type and non-common file type.
8. file extension adds color attribute to distinguish a device for file type, it is characterized in that, comprising:
Form creation module, for creating file type color table, at least includes extension name, file type and marker color in correspondence with each other in described file type color table;
Extension name identification module, during for file when display file system, reads the filename of described file, and from this document name, identifies the extension name of file;
Table lookup module, for inquiring about described file type color table;
Extension name color is added module, is used to the extension name of described file to give the marker color of corresponding document type, and is plotted on screen.
9. device according to claim 8, is characterized in that, described extension name identification module is further used for reading the filename of described file, the extension name using the character string after this document name last ". " number as file.
10. device according to claim 8, is characterized in that, described extension name color is added module and further comprised:
Filename is cut apart module, for the extension name of described file is split from the filename of described file;
Color is added module, for adding to the extension name of described file from the marker color of the described file type color table file type corresponding with extension name described file that find out, and after interpolation completes, the extension name of described file is plotted on screen.
11. devices according to claim 8, is characterized in that, described form creation module is reserved with interface, for add voluntarily or revise extension name, file type or marker color to user at described file type color table.
CN201410395870.3A 2014-08-12 2014-08-12 Method and device for adding color attributes into filename extensions to distinguish file types Pending CN104156666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410395870.3A CN104156666A (en) 2014-08-12 2014-08-12 Method and device for adding color attributes into filename extensions to distinguish file types

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410395870.3A CN104156666A (en) 2014-08-12 2014-08-12 Method and device for adding color attributes into filename extensions to distinguish file types

Publications (1)

Publication Number Publication Date
CN104156666A true CN104156666A (en) 2014-11-19

Family

ID=51882163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410395870.3A Pending CN104156666A (en) 2014-08-12 2014-08-12 Method and device for adding color attributes into filename extensions to distinguish file types

Country Status (1)

Country Link
CN (1) CN104156666A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106845222A (en) * 2016-12-02 2017-06-13 哈尔滨安天科技股份有限公司 A kind of detection method and system of blackmailer's virus
CN110019007A (en) * 2017-10-30 2019-07-16 北京金风科创风电设备有限公司 Data processing method and device
CN112835864A (en) * 2021-02-03 2021-05-25 北京联创信安科技股份有限公司 File storage method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1831814A (en) * 2005-03-10 2006-09-13 株式会社东芝 Document file management apparatus, document file management method, and document file management program
CN103164402A (en) * 2011-12-08 2013-06-19 青岛海尔电子有限公司 Method for displaying files

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1831814A (en) * 2005-03-10 2006-09-13 株式会社东芝 Document file management apparatus, document file management method, and document file management program
CN103164402A (en) * 2011-12-08 2013-06-19 青岛海尔电子有限公司 Method for displaying files

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DYNAGEN: "TC 神器应用——颜色与备注", 《HTTP://DYNAGEN.BLOG.51CTO.COM/903965/606813》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106845222A (en) * 2016-12-02 2017-06-13 哈尔滨安天科技股份有限公司 A kind of detection method and system of blackmailer's virus
CN110019007A (en) * 2017-10-30 2019-07-16 北京金风科创风电设备有限公司 Data processing method and device
CN112835864A (en) * 2021-02-03 2021-05-25 北京联创信安科技股份有限公司 File storage method, device, equipment and storage medium
CN112835864B (en) * 2021-02-03 2024-02-20 北京联创信安科技股份有限公司 File storage method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107644286B (en) Workflow processing method and device
CN110162525B (en) B+ tree-based read-write conflict resolution method, device and storage medium
US8572076B2 (en) Location context mining
US10552525B1 (en) Systems, methods and apparatuses for automated form templating
CN111737221B (en) Data read-write method, device and equipment of cluster file system and storage medium
US20110231424A1 (en) Method and system for automated file aggregation on a storage device
CN111596911B (en) Method, device, computer equipment and storage medium for generating control
CN106204285A (en) Insurance rules process method based on cloud computing and system
CN104462590A (en) Information searching method and device
WO2020082376A1 (en) Desktop management method and apparatus, mobile terminal, and storage medium
CN104156666A (en) Method and device for adding color attributes into filename extensions to distinguish file types
CN110941629A (en) Metadata processing method, device, equipment and computer readable storage medium
CN103577554A (en) Method and device for triggering multimedia database scanning of Android equipment
CN113377458B (en) Plug-in management method and device, electronic equipment and storage medium
CN111241071A (en) Data migration method, system, equipment and computer readable storage medium
CN103136264B (en) Attachment query method and user terminal
CN103176979B (en) The online duplication method of format file content, equipment and system
JP6016743B2 (en) Icon display of file history recorded as additional data in storage
CN102171696B (en) The generation method and apparatus of customization data
CN107872482A (en) The method and device of transmitting file on a kind of mobile terminal
CN109918346A (en) A kind of creation method and device of file
CN111694627B (en) Desktop editing method and device
CN114741139A (en) sketch graphic file processing method and device, electronic equipment and storage medium
CN112837107A (en) Cross-platform commodity recommendation method and device and computer equipment
CN105488054A (en) Method and device for browsing image

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141119

RJ01 Rejection of invention patent application after publication