CN113590046B - Method for reading and writing file of singlechip - Google Patents
Method for reading and writing file of singlechip Download PDFInfo
- Publication number
- CN113590046B CN113590046B CN202110885351.5A CN202110885351A CN113590046B CN 113590046 B CN113590046 B CN 113590046B CN 202110885351 A CN202110885351 A CN 202110885351A CN 113590046 B CN113590046 B CN 113590046B
- Authority
- CN
- China
- Prior art keywords
- file
- derivative
- max
- capacity
- source
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/164—File meta data generation
- G06F16/166—File name conversion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/178—Techniques for file synchronisation in file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0643—Management of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0652—Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method for reading and writing a single chip microcomputer file, which comprises the following steps: predefining configuration parameters of individual files in a file system, including file capacity V of individual files max The method comprises the steps of carrying out a first treatment on the surface of the File writing process: if the file size of the target file is greater than V max Writing the split files; reading a file: if the file size of the target file is greater than V max And automatically reading across files. The method for reading and writing the single chip microcomputer file has the following advantages: the invention provides a file reading and writing method for a singlechip, which can effectively improve the file reading and writing speed, enable the application to run more smoothly and improve the use experience of users.
Description
Technical Field
The invention belongs to the technical field of file reading and writing, and particularly relates to a single chip microcomputer file reading and writing method.
Background
Currently, in the POS machine that has been used and is being developed, a single-chip microcomputer is generally used, and the single-chip microcomputer loads a littlefs file system that uses an arm open source, where the advantage of the file system is to support power-off protection, however, the file system has the following disadvantages: the file reading and writing speed is slower, and especially for a large file needing to be read and written, the clamping is serious, so that the use experience of a user is reduced.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention provides a singlechip file reading and writing method which can effectively solve the problems.
The technical scheme adopted by the invention is as follows:
the invention provides a method for reading and writing a single chip microcomputer file, which comprises the following steps:
step 1, predefining configuration parameters of single files in a file system, including file capacity V of the single files max ;
Step 2, a file writing process:
step 2.1, receiving a first target file requiring a write operation 1 First object file 1 Name of the file of (1) 1 ;
Step 2.2, obtaining a first target file 1 File capacity V of (2) 1 ;
Step 2.3, judging the file volume V 1 Whether or not to be less than or equal to the file capacity V max If yes, executing the step 2.4; if not, executing the step 2.5;
step 2.4, when the file size V 1 Less than or equal to the file capacity V max When the first target file is created in the file system 1 Source file s_file of (1) 1 Source file s_file 1 The file capacity of (2) is V max Named as first target file 1 Name of the file of (1) 1 ;
Then, the first object file is file 1 Direct write to source file s_file 1 And storing;
step 2.5, when the file size V 1 Greater than the file capacity V max When the method is used, the following mode is adopted for writing the divided files:
step 2.5.1, suppose V 1 /V max Is n, then a first target file is created in the file system 1 Source file s_file of (1) 1 Source file s_file 1 The file capacity of (2) is V max Named as first target file 1 Name of the file of (1) 1 ;
Creating source file s_file in file system 1 1 st derivative file s_file of (2) 1 1 st derivative file s_file 1 File capacity of_1 is V max Naming includes the first object file 1 Name of the file of (1) 1 Derivative file number 01;
creating source file s_file in file system 1 2 nd derivative file s_file of (2) 1 2 nd derived file s_file 1 File capacity of 2 is V max Naming includes the first object file 1 Is a text of (1)Name of piece 1 Derivative file number 02;
and so on
Until the source file s_file is created in the file system 1 N-th derivative file s_file of (2) 1 N, n-th derivative file s_file 1 N has a file size of V max Naming includes the first object file 1 Name of the file of (1) 1 Derivative file sequence number 0n;
step 2.5.2, with file size V max Dividing the first object file into units 1 Dividing into n+1 sections; wherein, 1 st section file content, 2 nd section file content, the nth section file content, its file capacity is V all max The method comprises the steps of carrying out a first treatment on the surface of the The n+1st section file content has the file capacity of: v (V) 1 -nV max ;
Writing the 1 st segment file content into the source file s_file 1 ;
Writing the content of the 2 nd segment file into the 1 st derivative file s_file 1 _1;
And so on, until the content of the (n+1) -th segment file is written into the (n) -th derivative file s_file 1 _n;
Step 2.5.3, save source file s_file 1 1 st derivative file s_file 1 1, &.n. derivative file s_file 1 _n;
Creating a first target file in a file system 1 Source file s_file of (1) 1 Source file s_file 1 The file capacity of (2) is V max Named as first target file 1 Name of the file of (1) 1 ;
Step 3, file reading process:
step 3.1, when the second target file needs to be read 2 When a second target file is obtained 2 Name of the file of (1) 2 Second object file 2 File capacity V of (2) 2 ;
Step 3.2, judging the file capacity V 2 Whether or not to be less than or equal to the file capacity V max If yes, executing the step 3.3; if not, executing the step 3.4;
step 3.3, when the file size V 2 Less than or equal to the file capacity V max When the second object file is indicated 2 Corresponding to only one source file, then in the file system, the corresponding source file s_file is found 2 And directly reading;
step 3.4, when the file size V 2 Greater than the file capacity V max When the method is used, the following mode is adopted for reading the cross file:
step 3.4.1, suppose V 2 /V max If the integer part of (a) is m, searching the corresponding source file s_file in the file system 2 And m derivative files, and sorting the m derivative files by derivative file sequence numbers in file names of the derivative files;
step 3.4.2, if the complete file name containing name needs to be read 2 Directly returning the corresponding source file s_file 2 M derived files;
if only the containing name needs to be read 2 The initial position s of the file content to be read is obtained 0 And file length L 0 ;
In source file s_file 2 And m derived files, locating to the starting position s of the read file 0 Assume that the i-th derivative file s_file 1 A certain position within_i, where i=1, 2,..m, if the i-th derivative file s_file 1 I from the starting position s 0 To the end position s 1 File length L of (2) 1 Greater than or equal to the file length L 0 Then directly derive file s_file at i 1 A, i reads the corresponding content and returns; conversely, if the ith derivative file s_file 1 I from the starting position s 0 To the end position s 1 File length L of (2) 1 Less than the file length L 0 Then in the ith derivative file s_file 1 I from the starting position s 0 After starting reading to its end position, the automatic cross-file reading is performed, namely: automatically reading the (i+1) -th derivative file s_file 1 I, and so on until the complete file content is read.
Preferably, the method further comprises:
and 4, summing the file lengths of the source file and all derived files corresponding to a certain target file when the file length of the target file is required to be acquired, and returning.
Preferably, the method further comprises:
and 5, synchronously renaming the corresponding source file and all the derivative files when a certain target file needs to be renamed.
Preferably, the method further comprises:
and 6, synchronously deleting the corresponding source file and all derivative files when a certain target file needs to be deleted.
The method for reading and writing the single chip microcomputer file has the following advantages:
the invention provides a file reading and writing method for a singlechip, which can effectively improve the file reading and writing speed, enable the application to run more smoothly and improve the use experience of users.
Drawings
Fig. 1 is a schematic flow chart of a method for reading and writing a file of a single chip microcomputer.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects solved by the invention more clear, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the background of widely used POS, when ordinary POS, MPOS and other devices are used for daily transaction, the file reading and writing speed is low. Therefore, the method for reading and writing the file of the singlechip can effectively improve the reading and writing speed of the file, enable the application to run more smoothly and improve the use experience of a user.
The method for reading and writing the file of the singlechip improves the file system on the basis of the original file system, and when the read and written file is smaller than or equal to 64K (self-defined value), the read and written file name is unchanged; when the read-write file is larger than 64K (user-defined value), the file can be automatically divided for reading and writing.
Referring to fig. 1, the method for reading and writing the file of the singlechip provided by the invention comprises the following steps:
step 1, predefining configuration parameters of single files in a file system, including file capacity V of the single files max ;
For example, the file capacity V of a single file max For 64K, the specific value is flexibly set according to the actual requirement, the invention is not limited to this, and of course, the smaller the file capacity of a predefined single file is, the faster the file read-write operation speed is.
Step 2, a file writing process:
step 2.1, receiving a first target file requiring a write operation 1 First object file 1 Name of the file of (1) 1 ;
Step 2.2, obtaining a first target file 1 File capacity V of (2) 1 ;
Step 2.3, judging the file volume V 1 Whether or not to be less than or equal to the file capacity V max If yes, executing the step 2.4; if not, executing the step 2.5;
step 2.4, when the file size V 1 Less than or equal to the file capacity V max When the first target file is created in the file system 1 Source file s_file of (1) 1 Source file s_file 1 The file capacity of (2) is V max Named as first target file 1 Name of the file of (1) 1 ;
Then, the first object file is file 1 Direct write to source file s_file 1 And storing;
step 2.5, when the file size V 1 Greater than the file capacity V max When the method is used, the following mode is adopted for writing the divided files:
step 2.5.1, suppose V 1 /V max Is n, then a first target file is created in the file system 1 Source file s_file of (1) 1 Source file s_file 1 The file capacity of (2) is V max Named as first target file 1 Is a text of (1)Name of piece 1 ;
Creating source file s_file in file system 1 1 st derivative file s_file of (2) 1 1 st derivative file s_file 1 File capacity of_1 is V max Naming includes the first object file 1 Name of the file of (1) 1 Derivative file number 01;
creating source file s_file in file system 1 2 nd derivative file s_file of (2) 1 2 nd derived file s_file 1 File capacity of 2 is V max Naming includes the first object file 1 Name of the file of (1) 1 Derivative file number 02;
and so on
Until the source file s_file is created in the file system 1 N-th derivative file s_file of (2) 1 N, n-th derivative file s_file 1 N has a file size of V max Naming includes the first object file 1 Name of the file of (1) 1 Derivative file sequence number 0n;
step 2.5.2, with file size V max Dividing the first object file into units 1 Dividing into n+1 sections; wherein, 1 st section file content, 2 nd section file content, the nth section file content, its file capacity is V all max The method comprises the steps of carrying out a first treatment on the surface of the The n+1st section file content has the file capacity of: v (V) 1 -nV max ;
Writing the 1 st segment file content into the source file s_file 1 ;
Writing the content of the 2 nd segment file into the 1 st derivative file s_file 1 _1;
And so on, until the content of the (n+1) -th segment file is written into the (n) -th derivative file s_file 1 _n;
Step 2.5.3, save source file s_file 1 1 st derivative file s_file 1 1, &.n. derivative file s_file 1 _n;
Creating a first target file in a file system 1 Source file s_file of (1) 1 Source file s_file 1 The file capacity of (2) is V max Named as first target file 1 Name of the file of (1) 1 ;
That is to say: when writing a file, if the file to be written is smaller than or equal to the self-defined file capacity, the file name is unchanged and the file is directly written; and if the file to be written is larger than the capacity of the custom file, automatically dividing the file to be written.
For example, custom file capacity V max If the file capacity of the file to be written is 15K and is 10K, automatically writing 1-10K file contents into a source file testA.txt; the 11 th through 15 th K file contents are written to the 1 st derivative file testA.txt_01. The testA is the file name of the file to be written.
The file names of the source file and the derivative file both comprise testA, so that the corresponding file can be quickly positioned by searching the file name, and the searching is quick and convenient.
Step 3, file reading process:
step 3.1, when the second target file needs to be read 2 When a second target file is obtained 2 Name of the file of (1) 2 Second object file 2 File capacity V of (2) 2 ;
Step 3.2, judging the file capacity V 2 Whether or not to be less than or equal to the file capacity V max If yes, executing the step 3.3; if not, executing the step 3.4;
step 3.3, when the file size V 2 Less than or equal to the file capacity V max When the second object file is indicated 2 Corresponding to only one source file, then in the file system, the corresponding source file s_file is found 2 And directly reading;
step 3.4, when the file size V 2 Greater than the file capacity V max When the method is used, the following mode is adopted for reading the cross file:
step 3.4.1, suppose V 2 /V max If the integer part of (a) is m, searching the corresponding source file s_file in the file system 2 And m derivative files, and, by the derivative file sequence number in the file name of the derivative file, for m derivative filesSorting the pieces;
step 3.4.2, if the complete file name containing name needs to be read 2 Directly returning the corresponding source file s_file 2 M derived files;
if only the containing name needs to be read 2 The initial position s of the file content to be read is obtained 0 And file length L 0 ;
In source file s_file 2 And m derived files, locating to the starting position s of the read file 0 Assume that the i-th derivative file s_file 1 A certain position within_i, where i=1, 2,..m, if the i-th derivative file s_file 1 I from the starting position s 0 To the end position s 1 File length L of (2) 1 Greater than or equal to the file length L 0 Then directly derive file s_file at i 1 A, i reads the corresponding content and returns; conversely, if the ith derivative file s_file 1 I from the starting position s 0 To the end position s 1 File length L of (2) 1 Less than the file length L 0 Then in the ith derivative file s_file 1 I from the starting position s 0 After starting reading to its end position, the automatic cross-file reading is performed, namely: automatically reading the (i+1) -th derivative file s_file 1 I, and so on until the complete file content is read.
Reading a file: when the displacement and the length of the file content to be read are in a file, reading normally; when the length of the file content to be read is larger than the length of the custom file, the file is automatically read across.
For example, custom file capacity V max The length of the file content to be read is 8K, and the starting position of the file content to be read is at the 5 th K byte position in the source file testA.txt. Thus, first in the source file testa.txt, starting from 5K, a 5K byte file is read. Then, automatically locate to the 1 st derivative file testa.txt_01, and automatically read the 3 kbyte length file starting from the start position of testa.txt_01.
And 4, summing the file lengths of the source file and all derived files corresponding to a certain target file when the file length of the target file is required to be acquired, and returning.
And 5, synchronously renaming the corresponding source file and all the derivative files when a certain target file needs to be renamed.
And 6, synchronously deleting the corresponding source file and all derivative files when a certain target file needs to be deleted.
The method for reading and writing the single chip microcomputer file has the following advantages:
1. the read-write operation speed can be effectively improved, and the application operation is smoother.
2. When the operations of file reading and writing, file length obtaining, deleting, file renaming and the like are carried out, only the source file name is needed to be obtained, the operation of deriving the file is not needed to be considered, and the operation is convenient, efficient and smooth.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which is also intended to be covered by the present invention.
Claims (4)
1. A method for reading and writing a single chip microcomputer file is characterized by comprising the following steps:
step 1, predefining configuration parameters of single files in a file system, including file capacity V of the single files max ;
Step 2, a file writing process:
step 2.1, receiving a first target file requiring a write operation 1 First object file 1 Name of the file of (1) 1 ;
Step 2.2, obtaining a first target file 1 File capacity V of (2) 1 ;
Step 2.3, judging the file volume V 1 Whether or not to be less than or equal to the file capacity V max If yes, executing the step 2.4; if not, executing the step 2.5;
step 2.4, when the file size V 1 Less than or equal to the file capacity V max When the first target file is created in the file system 1 Source file s_file of (1) 1 Source file s_file 1 The file capacity of (2) is V max Named as first target file 1 Name of the file of (1) 1 ;
Then, the first object file is file 1 Direct write to source file s_file 1 And storing;
step 2.5, when the file size V 1 Greater than the file capacity V max When the method is used, the following mode is adopted for writing the divided files:
step 2.5.1, suppose V 1 /V max Is n, then a first target file is created in the file system 1 Source file s_file of (1) 1 Source file s_file 1 The file capacity of (2) is V max Named as first target file 1 Name of the file of (1) 1 ;
Creating source file s_file in file system 1 1 st derivative file s_file of (2) 1 1 st derivative file s_file 1 File capacity of_1 is V max Naming includes the first object file 1 Name of the file of (1) 1 Derivative file number 01;
creating source file s_file in file system 1 2 nd derivative file s_file of (2) 1 2 nd derived file s_file 1 File capacity of 2 is V max Naming includes the first object file 1 Name of the file of (1) 1 Derivative file number 02;
and so on
Until the source file s_file is created in the file system 1 N-th derivative file s_file of (2) 1 N, n-th derivative file s_file 1 N has a file size of V max Naming includes the first object file 1 Name of the file of (1) 1 Derivative file sequence number 0n;
step 2.5.2, with file size V max Dividing the first object file into units 1 Dividing into n+1 sections; wherein, 1 st section file content, 2 nd section file content, the nth section file content, its file capacity is V all max The method comprises the steps of carrying out a first treatment on the surface of the The n+1st section file content has the file capacity of: v (V) 1 -nV max ;
Writing the 1 st segment file content into the source file s_file 1 ;
Writing the content of the 2 nd segment file into the 1 st derivative file s_file 1 _1;
And so on, until the content of the (n+1) -th segment file is written into the (n) -th derivative file s_file 1 _n;
Step 2.5.3, save source file s_file 1 1 st derivative file s_file 1 1, &.n. derivative file s_file 1 _n;
Creating a first target file in a file system 1 Source file s_file of (1) 1 Source file s_file 1 The file capacity of (2) is V max Named as first target file 1 Name of the file of (1) 1 ;
Step 3, file reading process:
step 3.1, when the second target file needs to be read 2 When a second target file is obtained 2 Name of the file of (1) 2 Second object file 2 File capacity V of (2) 2 ;
Step 3.2, judging the file capacity V 2 Whether or not to be less than or equal to the file capacity V max If yes, executing the step 3.3; if not, executing the step 3.4;
step 3.3, when the file size V 2 Less than or equal to the file capacity V max When the second object file is indicated 2 Corresponding to only one source file, then in the file system, the corresponding source file s_file is found 2 And directly reading;
step 3.4, when the file size V 2 Greater than the file capacity V max When the method is used, the following mode is adopted for reading the cross file:
step 3.4.1, suppose V 2 /V max M, then found in the file systemCorresponding source file s_file 2 And m derivative files, and sorting the m derivative files by derivative file sequence numbers in file names of the derivative files;
step 3.4.2, if the complete file name containing name needs to be read 2 Directly returning the corresponding source file s_file 2 M derived files;
if only the containing name needs to be read 2 The initial position s of the file content to be read is obtained 0 And file length L 0 ;
In source file s_file 2 And m derived files, locating to the starting position s of the read file 0 Assume that the i-th derivative file s_file 1 A certain position within_i, where i=1, 2,..m, if the i-th derivative file s_file 1 I from the starting position s 0 To the end position s 1 File length L of (2) 1 Greater than or equal to the file length L 0 Then directly derive file s_file at i 1 A, i reads the corresponding content and returns; conversely, if the ith derivative file s_file 1 I from the starting position s 0 To the end position s 1 File length L of (2) 1 Less than the file length L 0 Then in the ith derivative file s_file 1 I from the starting position s 0 After starting reading to its end position, the automatic cross-file reading is performed, namely: automatically reading the (i+1) -th derivative file s_file 1 I, and so on until the complete file content is read.
2. The method for reading and writing a file of a single chip microcomputer according to claim 1, further comprising:
and 4, summing the file lengths of the source file and all derived files corresponding to a certain target file when the file length of the target file is required to be acquired, and returning.
3. The method for reading and writing a file of a single chip microcomputer according to claim 1, further comprising:
and 5, synchronously renaming the corresponding source file and all the derivative files when a certain target file needs to be renamed.
4. The method for reading and writing a file of a single chip microcomputer according to claim 1, further comprising:
and 6, synchronously deleting the corresponding source file and all derivative files when a certain target file needs to be deleted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110885351.5A CN113590046B (en) | 2021-08-03 | 2021-08-03 | Method for reading and writing file of singlechip |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110885351.5A CN113590046B (en) | 2021-08-03 | 2021-08-03 | Method for reading and writing file of singlechip |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113590046A CN113590046A (en) | 2021-11-02 |
CN113590046B true CN113590046B (en) | 2023-10-31 |
Family
ID=78254276
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110885351.5A Active CN113590046B (en) | 2021-08-03 | 2021-08-03 | Method for reading and writing file of singlechip |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113590046B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102789492A (en) * | 2012-07-05 | 2012-11-21 | 天津三星通信技术研究有限公司 | File mobility management method and device |
CN111208988A (en) * | 2019-12-24 | 2020-05-29 | 杭州海兴电力科技股份有限公司 | Single-chip microcomputer file system compiling method and single-chip microcomputer system |
CN111444154A (en) * | 2020-03-26 | 2020-07-24 | 涵涡智航科技(玉溪)有限公司 | Method for efficiently storing log files in single chip microcomputer system |
CN111797058A (en) * | 2020-07-02 | 2020-10-20 | 长沙景嘉微电子股份有限公司 | Universal file system and file management method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3198493A4 (en) * | 2015-12-03 | 2017-08-09 | Huawei Technologies Co., Ltd. | A method a source storage device to send a source file and a clone file of the source file to a backup storage device, a source storage device and a backup storage device |
JP7244352B2 (en) * | 2019-05-22 | 2023-03-22 | ファナック株式会社 | File management device |
-
2021
- 2021-08-03 CN CN202110885351.5A patent/CN113590046B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102789492A (en) * | 2012-07-05 | 2012-11-21 | 天津三星通信技术研究有限公司 | File mobility management method and device |
CN111208988A (en) * | 2019-12-24 | 2020-05-29 | 杭州海兴电力科技股份有限公司 | Single-chip microcomputer file system compiling method and single-chip microcomputer system |
CN111444154A (en) * | 2020-03-26 | 2020-07-24 | 涵涡智航科技(玉溪)有限公司 | Method for efficiently storing log files in single chip microcomputer system |
CN111797058A (en) * | 2020-07-02 | 2020-10-20 | 长沙景嘉微电子股份有限公司 | Universal file system and file management method |
Non-Patent Citations (2)
Title |
---|
HCS12X单片机的SD卡FAT文件***读写设计;时尧;;单片机与嵌入式***应用(第09期);第2629页 * |
基于51单片机和FAT32文件***的SDHC卡读写***设计;吴增;齐虹;陈冲;;闽江学院学报(第05期);第41-48页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113590046A (en) | 2021-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Bayer et al. | Organization and maintenance of large ordered indices | |
US7165156B1 (en) | Read-write snapshots | |
KR940005775B1 (en) | Method of opening disk file | |
US5537628A (en) | Method for handling different code pages in text | |
WO1999057655A3 (en) | Split file system | |
GB8915875D0 (en) | A method of operating a data processing system | |
US20100138613A1 (en) | Data Caching | |
CN100507919C (en) | FAT file system and its processing method | |
EP0121072A3 (en) | Method for accessing a data set in a word processing system | |
CN113590046B (en) | Method for reading and writing file of singlechip | |
US20060004969A1 (en) | High-speed accessible memory featuring reduced data movement | |
CN1235313A (en) | Computer file title searching system | |
JPS59220853A (en) | Disc cache system | |
CN100444166C (en) | Position-based interface access method and device for FAT file system | |
JPH0561758A (en) | Information link device | |
CN109885539A (en) | A kind of log file management method | |
CN116339817B (en) | Universal m3u8 file rewriting method and system | |
CN113590550B (en) | File creation method and device and electronic equipment | |
JPS60252973A (en) | Dynamic loading control system | |
JP2573577B2 (en) | File access device | |
JPS61248124A (en) | Input precedence control system | |
KR19980063328A (en) | Data output method of external storage device | |
GB2317972A (en) | Supplementing or replacing data in a ROM | |
JPS63184960A (en) | Data control system | |
JP2000172542A (en) | File access system |
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 |