CN110019040B - Folder processing method, mobile terminal and storage medium - Google Patents

Folder processing method, mobile terminal and storage medium Download PDF

Info

Publication number
CN110019040B
CN110019040B CN201811126817.8A CN201811126817A CN110019040B CN 110019040 B CN110019040 B CN 110019040B CN 201811126817 A CN201811126817 A CN 201811126817A CN 110019040 B CN110019040 B CN 110019040B
Authority
CN
China
Prior art keywords
folder
processed
mobile terminal
processing
instruction
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.)
Active
Application number
CN201811126817.8A
Other languages
Chinese (zh)
Other versions
CN110019040A (en
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 CN201811126817.8A priority Critical patent/CN110019040B/en
Publication of CN110019040A publication Critical patent/CN110019040A/en
Application granted granted Critical
Publication of CN110019040B publication Critical patent/CN110019040B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/162Delete operations
    • 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/18File system types
    • G06F16/182Distributed file systems

Abstract

The application is applicable to the technical field of media transmission, and provides a folder processing method, a mobile terminal and a storage medium, wherein the method comprises the following steps: after the mobile terminal is connected with the terminal equipment, if the processing instruction of the folder in the storage space of the mobile terminal sent by the terminal equipment is monitored, the information of the folder to be processed corresponding to the processing instruction is acquired, the folder to be processed corresponding to the processing instruction and the files in the folder to be processed are processed based on the information of the folder to be processed corresponding to the processing instruction, the processing result is sent to the terminal equipment after the processing of the files in the folder to be processed is completed, and when the folder in the storage space of the mobile terminal is processed on one side of the terminal equipment, the number of times of information interaction between the terminal equipment and the mobile terminal can be reduced through the application, so that the success rate of folder processing is improved.

Description

Folder processing method, mobile terminal and storage medium
Technical Field
The present application belongs to the technical field of media transmission, and in particular, to a folder processing method, a mobile terminal, and a computer-readable storage medium.
Background
Media Transfer Protocol (MTP) is a custom extension Protocol based on the Picture Transfer Protocol (PTP). After the MTP connection is established between a master device (e.g., a terminal device) and a slave device (e.g., a mobile terminal), the master device may perform processing, such as deleting, cutting, copying, and the like, on a file or a folder in a storage space of the slave device.
At present, when the master device and the slave device are connected based on MTP and a folder in a storage space of the slave device is subjected to related processing on one side of the master device, the master device and the slave device need to perform frequent information interaction according to the number of files stored in the folder, so that the related processing of the folder can be realized, and the problem of processing failure of the folder or file data loss easily occurs in this way.
Disclosure of Invention
In view of this, embodiments of the present application provide a folder processing method, a mobile terminal, and a computer-readable storage medium, so as to solve the problem that a folder in a storage space of a mobile terminal often fails or data is lost when the folder is processed at a terminal device side.
A first aspect of an embodiment of the present application provides a folder processing method, including:
after a mobile terminal is connected with a terminal device, monitoring a processing instruction of a folder in a storage space of the mobile terminal, which is sent by the terminal device;
if a processing instruction of the folder in the storage space of the mobile terminal sent by the terminal equipment is monitored, acquiring information of the folder to be processed corresponding to the processing instruction;
processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction;
and after the file processing of the folder to be processed and the files in the folder to be processed is finished, sending a processing result to the terminal equipment, wherein the processing result is used for indicating the terminal equipment to update a virtual media library, and the virtual media library is mapped to the virtual library on the terminal equipment by the media library on the mobile terminal.
A second aspect of an embodiment of the present application provides a mobile terminal, including:
the monitoring unit is used for monitoring a processing instruction of the folder in the storage space of the mobile terminal, which is sent by the terminal equipment, after the mobile terminal is connected with the terminal equipment;
the information acquisition unit is used for acquiring information of a folder to be processed corresponding to a processing instruction if the processing instruction of the folder in the storage space of the mobile terminal sent by the terminal equipment is monitored;
the processing unit is used for processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction;
and the interaction unit is used for sending a processing result to the terminal equipment after the file processing in the folder to be processed and the folder to be processed is finished, wherein the processing result is used for indicating the terminal equipment to update a virtual media library, and the virtual media library is a virtual library mapped to the terminal equipment by a media library on the mobile terminal.
A third aspect of an embodiment of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method provided in the first aspect of the embodiment of the present application when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by one or more processors, performs the steps of the method provided by the first aspect of embodiments of the present application.
A fifth aspect of embodiments of the present application provides a computer program product comprising a computer program that, when executed by one or more processors, performs the steps of the method provided by the first aspect of embodiments of the present application.
The embodiment of the application provides a folder processing method, which is applied to a mobile terminal, one side of the terminal equipment can send out a processing instruction for the folder, one side of the mobile terminal can send out the processing instruction for the folder according to the processing instruction for the folder sent out by one side of the terminal equipment, processing the folder to be processed corresponding to the processing instruction, sending the processing result to the terminal equipment after the folder to be processed and the files in the folder to be processed are all processed, because in the process of processing the folder, only one side of the mobile terminal sends the processing result to the terminal equipment after processing all the files in the folder to be processed, therefore, frequent information interaction between the terminal equipment and the mobile terminal is avoided, and data transmission interruption or data loss can be avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of an implementation of a folder processing method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of an implementation flow of another folder processing method provided in an embodiment of the present application;
fig. 3 is a schematic block diagram of a mobile terminal according to an embodiment of the present application;
fig. 4 is a schematic block diagram of another mobile terminal provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Fig. 1 is a schematic flow chart of an implementation process of a folder processing method provided in an embodiment of the present application, and as shown in the drawing, the method may include the following steps:
step S101, after the connection between the mobile terminal and the terminal equipment is established, monitoring a processing instruction of the folder in the storage space of the mobile terminal, which is sent by the terminal equipment.
In this embodiment of the present application, the mobile terminal and the terminal device may establish a connection based on a Universal Serial Bus (USB), and after establishing the connection, may perform information interaction based on a Media Transfer Protocol (MTP), for example, the terminal device completes related processing on a folder in a storage space of the mobile terminal, which may be deletion processing, cutting processing, copy processing, and the like. The mobile terminal side may monitor information sent to the mobile terminal by the terminal device, for example, monitor a processing instruction for a folder in the storage space of the mobile terminal.
As another embodiment of the present application, after the mobile terminal establishes a connection with the terminal device, the monitoring a processing instruction sent by the terminal device for the folder in the storage space of the mobile terminal includes:
after a mobile terminal is connected with a terminal device through a USB interface, a copying instruction or a cutting instruction of a folder in a storage space of the mobile terminal, which is sent by the terminal device based on a media transmission protocol, is monitored.
In this embodiment of the present application, the connection is established through a USB interface, which may be in a UMS mode or an MTP mode, where UMS represents a mass storage device, and MTP represents a media transfer protocol.
It should be noted that, in the embodiment of the present application, a folder is taken as an example for description, and in practical applications, a file stored in a storage space of a mobile terminal may also be processed in a related manner on a side of a terminal device, and reference may be made to a subsequent related description of processing of a folder, which is not described herein again.
Step S102, if a processing instruction of the folder in the storage space of the mobile terminal sent by the terminal equipment is monitored, information of the folder to be processed corresponding to the processing instruction is obtained.
In the embodiment of the present application, when a processing instruction sent by a terminal device for a folder in a storage space of a mobile terminal is monitored, information of the folder to be processed corresponding to the processing instruction needs to be acquired from the terminal device side, after a connection based on an MTP protocol is established between the terminal device and the mobile terminal, a media library can be formed from files stored in the storage space of the mobile terminal, and at the same time, files stored in the storage space of the mobile terminal are also displayed on the terminal device side, except that a virtual media library is displayed on the terminal device side, a user performs an operation on the virtual media library displayed on the terminal device side, for example, selects the virtual folder a and performs a deletion operation on the virtual folder a, and when the user performs a deletion operation on the virtual folder a in the virtual media library on the terminal device side, the processing instruction is sent to the mobile terminal, the mobile terminal monitors a deletion instruction sent by the terminal equipment to the folder A in the storage space of the mobile terminal, and at the moment, one side of the mobile terminal acquires information of the folder A to be processed corresponding to the deletion instruction. For example, path information of the to-be-processed folder a.
And step S103, processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction.
In the embodiment of the present application, when deleting the to-be-processed folder a, the deletion process is not performed on the folder a itself, but performed on the folder a and all files stored in the folder a. For example, the instruction sent by the user at the terminal device side is to delete the to-be-processed folder a in the virtual media library (the media library on the mobile terminal is mapped to the virtual library on the terminal device), and accordingly, the mobile terminal side needs to delete the to-be-processed folder a stored in the actual media library and all files or folders in the to-be-processed folder a. Namely, the user sends a processing instruction through the virtual media library at the terminal equipment side, and the mobile terminal side performs related processing on files in the real media library.
Step S104, after the file in the folder to be processed and the file in the folder to be processed are processed, sending a processing result to the terminal device, wherein the processing result is used for indicating the terminal device to update a virtual media library, and the virtual media library is a virtual library mapped to the terminal device by a media library on the mobile terminal.
In the embodiment of the application, the mobile terminal side sends the processing result to the terminal device after all files or folders in the folder to be processed are deleted, cut or copied, and the terminal device side updates the virtual media library. In this way, the media library on the side of the mobile terminal and the virtual media library on the side of the terminal device are still fully corresponding.
It should be noted that the deleting operation in this embodiment refers to deleting the to-be-processed folder and all files in the folder, and the copying operation in this embodiment refers to copying the to-be-processed folder and all files in the folder, and then pasting the copied to-be-processed folder and all files in the folder to a target folder (for example, a desktop, a root directory, a desktop, or a folder under the root directory). The cutting operation in the embodiment of the present application means that after the folder to be processed and all the files in the folder are cut, the cut folder to be processed and all the files in the folder are also required to be pasted to the target folder, and meanwhile, the folder to be processed under the original path is required to be deleted.
In the folder processing method provided by the embodiment of the application, one side of the terminal device can send a processing instruction to the folder, one side of the mobile terminal can send the processing instruction to the folder according to the processing instruction to the folder sent by one side of the terminal device, and can carry out related processing on the to-be-processed folder corresponding to the processing instruction.
Fig. 2 is a schematic flow chart of an implementation of another folder processing method provided in an embodiment of the present application, and as shown in the drawing, the method may include the following steps:
step S201, after the mobile terminal establishes a connection with the terminal device, acquiring a version of an operating system of the terminal device.
Step S202, if the version of the operating system of the terminal equipment is a preset version, monitoring a processing instruction of the folder in the storage space of the mobile terminal sent by the terminal equipment.
In the embodiment of the present application, since the MTP protocol represents a protocol, in practical applications, different processing flows may be generated based on the MTP protocol, and therefore, a problem that an operating system of a terminal device is compatible with the processing flow of the MTP protocol occurs, so that, in order to enable a folder to be processed based on the MTP protocol between the terminal device and a mobile terminal that establish a connection, the operating system of the terminal device may be acquired at a side of the mobile terminal. The corresponding processing flow is determined according to the operating system, the operating system compatible with the embodiment of the application can be set as the operating system with the preset version, and if the version of the operating system of the terminal device is the preset version, the processing instruction of the folder in the storage space of the mobile terminal, which is sent by the terminal device, can be monitored according to the processing flow provided by the embodiment of the application.
Step S203, if a processing instruction of the folder in the storage space of the mobile terminal sent by the terminal equipment is monitored, a to-be-processed folder handle and a target folder path handle corresponding to the processing instruction are obtained from the terminal equipment based on a media transmission protocol.
In this embodiment of the present application, when the processing instruction is a delete instruction, the mobile terminal side may obtain, from the terminal device side, a to-be-processed folder handle corresponding to the processing instruction based on a media transport protocol. When the processing instruction is a cutting or copying instruction, acquiring a folder handle to be processed and a target folder path handle corresponding to the processing instruction from the terminal equipment side based on a media transmission protocol.
In file I/O, to read data from a file, an operating system function is typically called and passed the file name, and a path to the file is selected to open the file, the function retrieving a sequence number, i.e., the file handle. The file handle is the only identification for the opened file. To read a block of data from a file, the function ReadFile is called, and the address of the file handle in the memory and the number of bytes to be copied are transferred to the operating system. And after the task is completed, the file is closed by calling the system function.
The target folder represents a folder to be copied or to be cut, e.g., folder B is copied into folder C, then folder C represents the target folder.
Step S204, inquiring and acquiring information of the folder to be processed and information of the target folder from a media library of the mobile terminal through the folder handle to be processed and the path handle of the target folder, wherein the information of the folder to be processed comprises: the name of the folder to be processed, the path of the folder to be processed, the name of the file stored in the folder to be processed, and the path of the file stored in the folder to be processed, wherein the information of the target folder comprises: path of the target folder.
In the embodiment of the application, if the processing instruction is a delete instruction, the name of the folder to be processed, the path of the folder to be processed, the name of the file stored in the folder to be processed, and the path of the file stored in the folder to be processed need to be obtained according to the handle of the folder to be processed; if the processing instruction is a cutting or copying instruction, the path of the target folder needs to be obtained according to the path handle of the target folder on the basis of obtaining the relevant information of the folder to be processed.
Multilevel files may be stored in the folder D to be processed, for example, the folder D to be processed stores the file a, the folder D1, the folder D2, and the folder D1 stores the file b and the file c, the folder D2 stores the file D, then the name of the folder to be processed is the folder D to be processed, the path of the folder D to be processed, the names a, b, c, and D of the files stored in the folder to be processed, and the path of the files stored in the folder to be processed (the path of the files stored in the files to be processed indicates the path of each level file or folder stored in the folder D).
Step S205, processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction.
In this embodiment of the application, when the processing instruction is a copy instruction, the processing, based on the information of the to-be-processed folder corresponding to the processing instruction, of the to-be-processed folder corresponding to the processing instruction and the files in the to-be-processed folder includes:
creating a target folder with the same name as the folder to be processed based on the path of the target folder, and storing the files stored in the folder to be processed in the target folder based on the path of the files stored in the folder to be processed;
when the processing instruction is a cutting instruction, the processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction includes:
creating a target folder with the same name as the folder to be processed based on the path of the target folder, and storing the files stored in the folder to be processed in the target folder based on the path of the files stored in the folder to be processed;
deleting the successfully stored files in the folder to be processed based on the path of the files stored in the folder to be processed;
and deleting the folder to be processed after all the files stored in the folder to be processed are successfully stored in the target folder.
When the processing instruction is a deleting instruction, the processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction includes:
deleting the files in the folder to be processed based on the paths of the files stored in the folder to be processed;
and deleting the folder to be processed after all the files stored in the folder to be processed are successfully deleted.
Step S206, after the folder to be processed and the files in the folder to be processed are processed, updating the processing result to the media library of the mobile terminal, and sending the processing result to the terminal device, wherein the processing result is used for indicating the terminal device to update the virtual media library, and the virtual media library is a virtual library mapped to the terminal device by the media library on the mobile terminal.
In this embodiment of the application, after the folder to be processed and the files in the folder to be processed are processed, the processing result is updated to the media library of the mobile terminal, and the processing result is sent to the terminal device, the media library of the mobile terminal is a real embodiment of the files stored in the storage space of the mobile terminal, and the virtual media library of the terminal device is a virtual library mapped to one side of the terminal device by the media library of the mobile terminal, that is, the files stored in the mobile terminal displayed on one side of the terminal device are not real files, but virtual files mapped on the terminal device by the mobile terminal. In order to ensure that the virtual library displayed on the terminal device can actually correspond to the media library on one side of the mobile terminal, the processing result needs to be updated to the media library of the mobile terminal after the to-be-processed folder and the files in the to-be-processed folder are processed, and meanwhile, the processing result is sent to the terminal device, so that the virtual media library displayed on one side of the terminal device completely corresponds to the files stored on one side of the mobile terminal. The user can perform relevant operation in the virtual media library of the terminal equipment, so that real relevant operation is performed on one side of the mobile terminal, after the real relevant operation is performed on the mobile terminal, the operation result is returned to the terminal equipment, and the user on one side of the terminal equipment can perform relevant processing on the file in the storage space of the mobile terminal on one side of the terminal equipment at any time.
In addition, it should be noted that, in the embodiments of the present application, the description is mainly performed from the mobile terminal side, when the mobile terminal acquires information from the terminal device or sends information to the terminal device, the information is realized by the driver layer on the mobile terminal side, and the folder processing on the mobile terminal side is realized by the framework layer on the mobile terminal side.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 3 is a schematic block diagram of a mobile terminal according to an embodiment of the present application, and only a portion related to the embodiment of the present application is shown for convenience of description.
The mobile terminal 3 may be a software unit, a hardware unit or a combination of software and hardware unit built in a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, etc., or may be integrated into a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, etc., as an independent pendant.
The mobile terminal 3 includes:
the monitoring unit 31 is configured to monitor a processing instruction sent by the terminal device for a folder in the storage space of the mobile terminal after the mobile terminal and the terminal device are connected;
the information obtaining unit 32 is configured to, if a processing instruction for the folder in the storage space of the mobile terminal sent by the terminal device is monitored, obtain information of the folder to be processed corresponding to the processing instruction;
the processing unit 33 is configured to process the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction;
an interaction unit 34, configured to send a processing result to the terminal device after the to-be-processed folder and the files in the to-be-processed folder are processed, where the processing result is used to instruct the terminal device to update a virtual media library, and the virtual media library is a virtual library mapped to the terminal device by the media library on the mobile terminal.
Optionally, the mobile terminal 3 further includes:
and the updating unit 35 is configured to update the processing result to the media library of the mobile terminal after the to-be-processed folder and the file in the to-be-processed folder are processed.
Optionally, the monitoring unit 31 is further configured to:
after a mobile terminal is connected with a terminal device through a USB interface, a copying instruction or a cutting instruction of a folder in a storage space of the mobile terminal, which is sent by the terminal device based on a media transmission protocol, is monitored.
Optionally, the information obtaining unit 32 is further configured to:
acquiring information of a folder to be processed corresponding to the processing instruction and information of a target folder, wherein the information of the folder to be processed comprises: the name of the folder to be processed, the path of the folder to be processed, the name of the file stored in the folder to be processed, and the path of the file stored in the folder to be processed, wherein the information of the target folder comprises: path of the target folder.
Optionally, the information obtaining unit 32 includes:
a handle obtaining module 321, configured to obtain, based on a media transport protocol, a to-be-processed folder handle and a target folder path handle corresponding to the processing instruction from the terminal device;
the query module 322 is configured to query the media library of the mobile terminal to obtain information of the to-be-processed folder and information of the target folder through the to-be-processed folder handle and the target folder path handle.
Optionally, when the processing instruction is a copy instruction, the processing unit 33 is further configured to:
creating a target folder with the same name as the folder to be processed based on the path of the target folder, and storing the files stored in the folder to be processed in the target folder based on the path of the files stored in the folder to be processed;
optionally, when the processing instruction is a cut instruction, the processing unit 33 is further configured to:
creating a target folder with the same name as the folder to be processed based on the path of the target folder, and storing the files stored in the folder to be processed in the target folder based on the path of the files stored in the folder to be processed;
deleting the successfully stored files in the folder to be processed based on the path of the files stored in the folder to be processed;
and deleting the folder to be processed after all the files stored in the folder to be processed are successfully stored in the target folder.
Optionally, the monitoring unit 31 includes:
a version obtaining module 311, configured to obtain a version of an operating system of the terminal device;
a monitoring module 312, configured to monitor a processing instruction sent by the terminal device for the folder in the storage space of the mobile terminal if the version of the operating system of the terminal device is a preset version.
It will be apparent to those skilled in the art that, for convenience and simplicity of description, the foregoing functional units and modules are merely illustrated in terms of division, and in practical applications, the foregoing functional allocation may be performed by different functional units and modules as needed, that is, the internal structure of the mobile terminal is divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the mobile terminal may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Fig. 4 is a schematic block diagram of a mobile terminal according to another embodiment of the present application. As shown in fig. 4, the mobile terminal 4 of this embodiment includes: one or more processors 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processors 40. The processor 40, when executing the computer program 42, implements the steps in the various method embodiments described above, such as the steps S101 to S104 shown in fig. 1. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the modules/units in the above-described mobile terminal embodiments, such as the functions of the modules 31 to 34 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 42 in the mobile terminal 4. For example, the computer program 42 may be divided into a monitoring unit, an information acquisition unit, a processing unit, an interaction unit.
The monitoring unit is used for monitoring a processing instruction of the folder in the storage space of the mobile terminal, which is sent by the terminal equipment, after the mobile terminal is connected with the terminal equipment;
the information acquisition unit is used for acquiring information of a folder to be processed corresponding to a processing instruction if the processing instruction of the folder in the storage space of the mobile terminal sent by the terminal equipment is monitored;
the processing unit is used for processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction;
and the interaction unit is used for sending a processing result to the terminal equipment after the file processing in the folder to be processed and the folder to be processed is finished, wherein the processing result is used for indicating the terminal equipment to update a virtual media library, and the virtual media library is a virtual library mapped to the terminal equipment by a media library on the mobile terminal.
Other units or modules may refer to the description of the embodiment shown in fig. 3, and are not described herein again.
The mobile terminal includes, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is only one example of a mobile terminal 4 and is not intended to limit the mobile terminal 4 and may include more or fewer components than shown, or some components may be combined, or different components, for example, the mobile terminal may also include input devices, output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the mobile terminal 4, such as a hard disk or a memory of the mobile terminal 4. The memory 41 may also be an external storage device of the mobile terminal 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the mobile terminal 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the mobile terminal 4. The memory 41 is used for storing the computer program and other programs and data required by the mobile terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed mobile terminal and method may be implemented in other ways. For example, the above-described embodiments of the mobile terminal are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (9)

1. A folder processing method is characterized by comprising the following steps:
after a mobile terminal is connected with a terminal device, monitoring a processing instruction of a folder in a storage space of the mobile terminal, which is sent by the terminal device; the processing instruction comprises a deleting instruction, a copying instruction and a cutting instruction; after the terminal equipment and the mobile terminal are connected, files stored in a storage space at one side of the mobile terminal form a media library, and a virtual media library is displayed at one side of the terminal equipment; the media library at one side of the mobile terminal and the virtual media library at one side of the terminal equipment are completely corresponding; the deleting instruction is used for deleting the folder to be processed and all files in the folder, and the copying instruction is used for copying the folder to be processed and all files in the folder and then pasting the copied folder to be processed and all files in the folder to a target folder; the cutting instruction is used for cutting the folder to be processed and all files in the folder, pasting the cut folder to be processed and all files in the folder to a target folder, and deleting the folder to be processed under the original path;
if a processing instruction of the folder in the storage space of the mobile terminal sent by the terminal equipment is monitored, acquiring information of the folder to be processed corresponding to the processing instruction, wherein the information includes: acquiring a folder handle to be processed and a target folder path handle corresponding to the processing instruction from the terminal equipment based on a media transmission protocol; inquiring and acquiring information of the folder to be processed and information of the target folder from a media library of the mobile terminal through the folder handle to be processed and the path handle of the target folder;
processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction;
and after the file processing of the folder to be processed and the files in the folder to be processed is finished, sending a processing result to the terminal equipment, wherein the processing result is used for indicating the terminal equipment to update a virtual media library, and the virtual media library is mapped to the virtual library on the terminal equipment by the media library on the mobile terminal.
2. The folder processing method according to claim 1, further comprising, after the processing of the to-be-processed folder and the files in the to-be-processed folder is completed:
and updating the processing result to a media library of the mobile terminal.
3. The folder processing method according to claim 1, wherein the monitoring of the processing instruction of the folder in the storage space of the mobile terminal issued by the terminal device after the mobile terminal establishes the connection with the terminal device comprises:
after a mobile terminal is connected with a terminal device through a USB interface, a copying instruction or a cutting instruction of a folder in a storage space of the mobile terminal, which is sent by the terminal device based on a media transmission protocol, is monitored.
4. The folder processing method according to claim 3, wherein the acquiring information of the folder to be processed corresponding to the processing instruction includes:
acquiring information of a folder to be processed corresponding to the processing instruction and information of a target folder, wherein the information of the folder to be processed comprises: the name of the folder to be processed, the path of the folder to be processed, the name of the file stored in the folder to be processed, and the path of the file stored in the folder to be processed, wherein the information of the target folder comprises: path of the target folder.
5. The folder processing method according to claim 4, wherein when the processing instruction is a copy instruction, the processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction includes:
creating a target folder with the same name as the folder to be processed based on the path of the target folder, and storing the files stored in the folder to be processed in the target folder based on the path of the files stored in the folder to be processed;
when the processing instruction is a cutting instruction, the processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction includes:
creating a target folder with the same name as the folder to be processed based on the path of the target folder, and storing the files stored in the folder to be processed in the target folder based on the path of the files stored in the folder to be processed;
deleting the successfully stored files in the folder to be processed based on the path of the files stored in the folder to be processed;
and deleting the folder to be processed after all the files stored in the folder to be processed are successfully stored in the target folder.
6. The folder processing method according to any one of claims 1 to 5, further comprising, before monitoring the processing instruction issued by the terminal device for the folder in the storage space of the mobile terminal:
acquiring the version of an operating system of the terminal equipment;
and if the version of the operating system of the terminal equipment is a preset version, monitoring a processing instruction of the folder in the storage space of the mobile terminal, which is sent by the terminal equipment.
7. A mobile terminal, comprising:
the monitoring unit is used for monitoring a processing instruction of the folder in the storage space of the mobile terminal, which is sent by the terminal equipment, after the mobile terminal is connected with the terminal equipment; the processing instruction comprises a deleting instruction, a copying instruction and a cutting instruction; after the terminal equipment and the mobile terminal are connected, files stored in a storage space at one side of the mobile terminal form a media library, and a virtual media library is displayed at one side of the terminal equipment; the media library at one side of the mobile terminal and the virtual media library at one side of the terminal equipment are completely corresponding; the deleting instruction is used for deleting the folder to be processed and all files in the folder, and the copying instruction is used for copying the folder to be processed and all files in the folder and then pasting the copied folder to be processed and all files in the folder to a target folder; the cutting instruction is used for cutting the folder to be processed and all files in the folder, pasting the cut folder to be processed and all files in the folder to a target folder, and deleting the folder to be processed under the original path;
the information acquisition unit is used for acquiring information of a folder to be processed corresponding to a processing instruction if the processing instruction of the folder in the storage space of the mobile terminal sent by the terminal equipment is monitored; the information acquisition unit includes: a handle acquiring module, configured to acquire, from the terminal device, a to-be-processed folder handle and a target folder path handle corresponding to the processing instruction based on a media transport protocol; the query module is used for querying and acquiring the information of the folder to be processed and the information of the target folder from a media library of the mobile terminal through the handle of the folder to be processed and the handle of the path of the target folder;
the processing unit is used for processing the folder to be processed corresponding to the processing instruction and the files in the folder to be processed based on the information of the folder to be processed corresponding to the processing instruction;
and the interaction unit is used for sending a processing result to the terminal equipment after the file processing in the folder to be processed and the folder to be processed is finished, wherein the processing result is used for indicating the terminal equipment to update a virtual media library, and the virtual media library is a virtual library mapped to the terminal equipment by a media library on the mobile terminal.
8. A mobile terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by one or more processors, implements the steps of the method according to any one of claims 1 to 6.
CN201811126817.8A 2018-09-26 2018-09-26 Folder processing method, mobile terminal and storage medium Active CN110019040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811126817.8A CN110019040B (en) 2018-09-26 2018-09-26 Folder processing method, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811126817.8A CN110019040B (en) 2018-09-26 2018-09-26 Folder processing method, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110019040A CN110019040A (en) 2019-07-16
CN110019040B true CN110019040B (en) 2022-04-12

Family

ID=67188452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811126817.8A Active CN110019040B (en) 2018-09-26 2018-09-26 Folder processing method, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110019040B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111354050A (en) * 2020-02-25 2020-06-30 安徽以萨数据技术有限公司 Android-based picture compression method and device and storage medium
CN114610239A (en) * 2022-03-14 2022-06-10 深圳依时货拉拉科技有限公司 Method and device for operating file in portable memory by mobile terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649596A (en) * 2016-11-24 2017-05-10 歌尔科技有限公司 Method and device for displaying folder catalogue in intelligent terminal
CN107168905A (en) * 2017-05-11 2017-09-15 广东欧珀移动通信有限公司 A kind of document display method, device, storage medium and mobile terminal
CN107577822A (en) * 2017-10-13 2018-01-12 广东欧珀移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal
CN107609119A (en) * 2017-09-13 2018-01-19 广东欧珀移动通信有限公司 Document handling method, mobile terminal and computer-readable recording medium
CN107766488A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 A kind of information query method, terminal, computer-readable recording medium
CN108268330A (en) * 2018-01-16 2018-07-10 深圳市天珑移动技术有限公司 Document transmission method, mobile terminal and computer readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101490688B1 (en) * 2008-03-03 2015-02-06 삼성전자주식회사 Apparatus for storing and processing contents and method of transmitting object meta information about contents using media transfer protocol from the apparatus
KR20130056539A (en) * 2011-11-22 2013-05-30 삼성전자주식회사 Apparatas and method for performing communication with media transfer protocol supported device in a portable terminal
CN106991130A (en) * 2017-03-07 2017-07-28 广东欧珀移动通信有限公司 A kind of document handling method, device and intelligent terminal
CN107526835B (en) * 2017-09-06 2019-05-24 Oppo广东移动通信有限公司 Data connection processing method, data connection processing unit and intelligent terminal
CN108038112B (en) * 2017-09-28 2020-01-10 Oppo广东移动通信有限公司 File processing method, mobile terminal and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649596A (en) * 2016-11-24 2017-05-10 歌尔科技有限公司 Method and device for displaying folder catalogue in intelligent terminal
CN107168905A (en) * 2017-05-11 2017-09-15 广东欧珀移动通信有限公司 A kind of document display method, device, storage medium and mobile terminal
CN107609119A (en) * 2017-09-13 2018-01-19 广东欧珀移动通信有限公司 Document handling method, mobile terminal and computer-readable recording medium
CN107577822A (en) * 2017-10-13 2018-01-12 广东欧珀移动通信有限公司 A kind of method of data synchronization, data synchronization unit and mobile terminal
CN107766488A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 A kind of information query method, terminal, computer-readable recording medium
CN108268330A (en) * 2018-01-16 2018-07-10 深圳市天珑移动技术有限公司 Document transmission method, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN110019040A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN109376126B (en) File or folder processing method, mobile terminal and storage medium
CN109359091B (en) File management method, device, terminal and computer readable storage medium
CN104699423B (en) The method and apparatus that drive is bound in linux system
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
CN108255989B (en) Picture storage method and device, terminal equipment and computer storage medium
CN110019040B (en) Folder processing method, mobile terminal and storage medium
CN113010116A (en) Data processing method and device, terminal equipment and readable storage medium
CN111090623B (en) Data auditing method and device, electronic equipment and storage medium
CN109271543B (en) Thumbnail display method and device, terminal and computer-readable storage medium
CN110058995B (en) Database testing method and system capable of avoiding interference of database types
WO2020113421A1 (en) Method for mounting file system, terminal device, and storage medium
CN109104481B (en) File integrity detection method, file integrity detection device and terminal equipment
CN107506386B (en) Data aggregation method and device based on NAS, terminal equipment and storage medium
CN104063377A (en) Information processing method and electronic equipment using same
CN112527276B (en) Data updating method and device in visual programming tool and terminal equipment
CN114564210A (en) Copy deployment method, device, system, electronic equipment and storage medium
US10242025B2 (en) Efficient differential techniques for metafiles
CN114675776A (en) Resource storage method and device, storage medium and electronic equipment
CN110300222B (en) Short message display method, system, terminal equipment and computer readable storage medium
CN108629175B (en) Access control method and access control device of USB mass storage equipment
CN113420306A (en) Resource sharing method and device, computing equipment and computer readable storage medium
CN109254855B (en) Registration method and device of parameter transmission protocol and electronic equipment
CN111142965A (en) Language configuration method and device, electronic equipment and storage medium
WO2021097758A1 (en) Incremental package generation method, incremental package generation apparatus, and server
WO2021097623A1 (en) File processing method and device, and terminal apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant