JPH0922375A - File management method - Google Patents

File management method

Info

Publication number
JPH0922375A
JPH0922375A JP7170817A JP17081795A JPH0922375A JP H0922375 A JPH0922375 A JP H0922375A JP 7170817 A JP7170817 A JP 7170817A JP 17081795 A JP17081795 A JP 17081795A JP H0922375 A JPH0922375 A JP H0922375A
Authority
JP
Japan
Prior art keywords
file
data
track
directory
recording
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7170817A
Other languages
Japanese (ja)
Inventor
Hideki Hosoya
英樹 細谷
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP7170817A priority Critical patent/JPH0922375A/en
Publication of JPH0922375A publication Critical patent/JPH0922375A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To prevent the omission of data from occurring by managing the final recording unit of a file as an invalid recording unit when the size of the file is not the integral multiple of a prescribed recording unit. SOLUTION: Whether or not all the final recording unit of the file to be added is valid, is checked. In this case, since the file A (2) is to be added to the file A (1), the data of the final recording track (m) of the A (1) are checked. The judgement is performed depending on whether or not a file capacity is the integral multiple of a track capacity. That is, it is judged that all the data of the final recording track (m) are valid in the case of being the integral multiple and that invalid data are present in the track (m) in the case of not being the integral multiple. In this case, since an invalid data part 204 is present in the final recording track (m), NO is judged and the valid data part 306 of the final recording track (m) of the file A (1) to be added is read onto the butter memory of a host computer. Then, addition is performed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、情報記録媒体のデ
ータファイルのファイル管理方法に関し、特に消去書換
不可能な情報記録媒体のファイルへのデータ追加時のフ
ァイル管理方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a file management method for data files on an information recording medium, and more particularly to a file management method for adding data to a file on an information recording medium that cannot be erased and rewritten.

【0002】[0002]

【従来の技術】従来、情報記録媒体としては、磁気を用
いて記録・再生を行うフロッピーディスク、光を用いて
記録・再生を行う光学的情報記録媒体等が知られてい
る。光学的情報記録媒体の形態としては、ディスク状、
カード状、テープ状等各種のものが知られている。この
ような光学的情報記録媒体のうちで、カード状の光学的
情報記録媒体(以下、光カードと称する)は、小型軽量
で持ち運びに便利な比較的大容量の情報記録媒体として
大きな需要が見込まれている。情報記録媒体はその媒体
の特性により、消去書換の可能なものと、不可能なもの
があるが、光カードは消去書換が不可能なものが一般的
で、医療分野等書換ができないことが利点となる分野で
の応用が期待されている。
2. Description of the Related Art Conventionally, as an information recording medium, a floppy disk for recording / reproducing by using magnetism, an optical information recording medium for recording / reproducing by using light, etc. are known. The optical information recording medium has a disc shape,
Various types such as cards and tapes are known. Among such optical information recording media, a card-shaped optical information recording medium (hereinafter, referred to as an optical card) is expected to be in great demand as a relatively large-capacity information recording medium that is small and lightweight and convenient to carry. Has been. Information recording media are erasable and rewritable depending on the characteristics of the media, but optical cards are generally erasable and non-erasable, which is an advantage that rewriting is not possible in the medical field. It is expected to be applied in the following fields.

【0003】一般に、このような情報記録媒体の大容量
のデータを管理するためには、データをブロックごとに
管理する補助データ、いわゆるディレクトリが用いられ
ている。ディレクトリとしては通常、そのディレクトリ
が管理するファイルのファイル名、ファイル長、先頭デ
ータトラック番号等のファイル情報からなり、これを記
録媒体の一部に書き込んでデータ部のファイル管理を行
っている。以上のような光カード、特に消去書換不可能
な光カードは、寸法がクレジットカード程度の大きさで
あっても大容量の記録容量を持っているので、その大容
量の情報を管理するためには、ディレクトリによる情報
の管理手法が必要である。
Generally, in order to manage a large amount of data on such an information recording medium, auxiliary data for managing data block by block, so-called directory is used. The directory is usually composed of file information such as the file name, file length and head data track number of the file managed by the directory, and this is written in a part of the recording medium to manage the file of the data section. The above optical cards, especially the non-erasable optical cards, have a large recording capacity even if they are about the size of a credit card. Requires a method of managing information using a directory.

【0004】図7は光カードの一例を示した概略的平面
図である。図7に示すように、光カードの記録領域には
データトラックからなるデータ部10(101、10
2、・・・、10n)とディレクトリ部20(201、
202、・・・、20m)とが設けられている。光カー
ドの上部のデータ部10にデータを記録する場合は、E
方向に書き込まれ、光カード1の下部のディレクトリ部
20にデータ管理情報であるディレクトリ情報を記録す
る場合は、D方向に書き込まれる。
FIG. 7 is a schematic plan view showing an example of an optical card. As shown in FIG. 7, in the recording area of the optical card, a data section 10 (101, 10) including data tracks is formed.
2, ..., 10n) and the directory unit 20 (201,
202, ..., 20 m). When recording data in the data section 10 above the optical card, E
When the directory information, which is the data management information, is recorded in the directory portion 20 below the optical card 1, the data is written in the D direction.

【0005】一方、データをファイルとして管理するた
めには、ファイルを他のファイルと区別するための識別
情報であるディレクトリ情報以外に、そのファイルが情
報記録媒体のどのトラック、またはトラックをいくつか
の単位に分割したセクタ、またはセクタを複数個まとめ
た管理単位であるクラスタから始まり、どのトラック
(以下、最小記録単位及び管理単位は1トラックである
ものとして説明する)にどのような順序で配置されてい
るかを表わす情報、即ちファイルの格納情報を示すため
のマップ情報が必要である。一般に、このマップ情報は
ファイル・アロケーション・テーブル(FAT)と呼ば
れている。
On the other hand, in order to manage data as a file, in addition to directory information which is identification information for distinguishing a file from other files, which track of the information recording medium, or which track the file has, may be determined. Starting from a sector that is divided into units, or a cluster that is a management unit in which a plurality of sectors are grouped together, it is arranged in which track (hereinafter, the minimum recording unit and the management unit is one track) and in what order. Information indicating whether the file is stored, that is, map information for indicating file storage information is required. Generally, this map information is called a file allocation table (FAT).

【0006】図8はこのようなFATの概念を説明する
ための図である。図8において、FAT30には光カー
ド上のデータトラックに対応した領域1、2、・・・、
N(一般に、2500前後)が用意されており、各領域
にはそのトラックに記録されている情報の続きの情報の
記録されているトラック番号が記録されている。例え
ば、図8では、領域1に始まるファイルは領域2、領域
4と続いており、領域3に始まるファイルは領域5、領
域6、領域7と続いていることを示している。なお、図
8において、領域中に“FF”と記してあるのは、その
ファイルは続きがないこと、即ちファイルの最終トラッ
クであることを、また“0”と記してあるのは、そのト
ラックが未使用(データの記録されていない)のトラッ
クであることを示している。このようなFATとディレ
クトリを併用することにより、ディレクトリからファイ
ル名等の識別情報及び先頭トラック番号が、FATから
その格納情報がそれぞれわかるため、効率的なファイル
管理を行うことができる。
FIG. 8 is a diagram for explaining the concept of such FAT. In FIG. 8, the FAT 30 has areas 1, 2, ..., Which correspond to the data tracks on the optical card.
N (generally around 2500) is prepared, and a track number in which information subsequent to the information recorded in that track is recorded is recorded in each area. For example, FIG. 8 shows that the file starting in the area 1 continues to the area 2 and the area 4, and the file starting to the area 3 continues to the area 5, the area 6 and the area 7. In FIG. 8, "FF" in the area indicates that the file does not continue, that is, the last track of the file, and "0" indicates that track. Indicates that it is an unused (no data recorded) track. By using the FAT and the directory together, the identification information such as the file name and the head track number can be known from the directory, and the stored information can be known from the FAT, so that efficient file management can be performed.

【0007】ところで、トラック単位で管理するFAT
を考えると、FATを光カード上に記録するためには、
最大トラック番号を2500とすると、図8の一つの領
域には12ビットが必要で、2500個の領域が必要で
あるから、12ビット×2500=30000ビット=
3750バイトの記憶容量が必要である。これは、例え
ば1トラックの容量を512バイトとすると、約7.3
トラック分の容量に相当する。
By the way, a FAT managed in track units
In order to record FAT on an optical card,
Assuming that the maximum track number is 2500, 12 bits are required for one area in FIG. 8 and 2500 areas are required. Therefore, 12 bits × 2500 = 30000 bits =
A storage capacity of 3750 bytes is required. This is about 7.3 when the capacity of one track is 512 bytes.
It is equivalent to the capacity of the track.

【0008】記録媒体が消去書換可能であれば、FAT
の領域を媒体上に特定の領域に用意して、新たなファイ
ルが記録されたり、ファイルが更新されたりして格納情
報に変化があった場合に、その領域を最新の情報に書き
換えれば良い。しかし、光カードのように消去書換不可
能な媒体では、格納情報に変化があるごとに新たなFA
Tを追加記録する必要があり、例えば新たなファイルを
追加する度に、前述のように約8トラック分の情報記録
容量をFATとして使用しなければならない。このこと
は、例えば全トラック数を2500とすると、2500
/8=約312となり、全トラックをFATとしても約
300回程度の格納情報の変化しか許容できないことに
なる。
If the recording medium is erasable and rewritable, FAT
The area may be prepared in a specific area on the medium, and when there is a change in the stored information due to a new file being recorded or the file being updated, the area may be rewritten with the latest information. However, with a non-erasable rewritable medium such as an optical card, a new FA is added whenever the stored information changes.
It is necessary to additionally record T, and for example, each time a new file is added, the information recording capacity of about 8 tracks must be used as the FAT as described above. This means that if the total number of tracks is 2500, for example,
/ 8 = about 312, which means that even if all tracks are set to FAT, only about 300 changes in stored information can be tolerated.

【0009】実際には、データ、ディレクトリを記録す
るので、FATに当てられるトラック数はさらに減少す
るが、反面、例えば一度(光カードを記録再生装置に挿
入してから排出するまで)に数回の格納情報の変化があ
っても、FATは光カードの排出前に一度のみ記録すれ
ばよいため、約300回と云う数値は目安でしかない
が、この値から大きく離れることはない。このように従
来においては、消去書換不可能な光カードにFATを記
録してファイル管理を行う場合は、光カードの情報容量
を有効に利用できないと云う問題点があった。
Actually, since the data and the directory are recorded, the number of tracks applied to the FAT is further reduced, but on the other hand, for example, several times at a time (from inserting the optical card into the recording / reproducing device to ejecting it). Even if there is a change in the stored information, the FAT needs to be recorded only once before the ejection of the optical card, so a value of about 300 times is only a guide, but it does not deviate significantly from this value. As described above, in the related art, when the FAT is recorded on the optical card that cannot be erased and rewritten for file management, there is a problem that the information capacity of the optical card cannot be effectively used.

【0010】このような問題は、データをトラックにラ
ンダムに記録することを許さずに、順次記録することの
みを許す、つまり、新しいファイルの記録は必ずその時
点での最終記録トラックの次トラックより開始し、デー
タは引き続くトラックに順次記録することにより解決す
ることができる。この場合、最初のトラック番号とファ
イルの大きさ(使用トラック数)はディレクトリ情報か
らわかり、情報の続きは必ず次のトラックにあるので、
FATを光カード上に記録しなくても、ディレクトリ情
報からFATを構成可能である。
Such a problem does not allow random recording of data on tracks, but only sequential recording, that is, recording of a new file is always performed from the track next to the last recording track at that time. Starting, the data can be resolved by sequentially recording on subsequent tracks. In this case, the first track number and the size of the file (the number of used tracks) can be known from the directory information, and the continuation of information is always in the next track.
The FAT can be constructed from the directory information without recording the FAT on the optical card.

【0011】一方、本願出願人は、消去書換不可能な情
報記録媒体におけるファイルへのデータの追加(アペン
ド)方法として、アペンドフラグを用いる方法を特開平
1−258288号公報で公開している。即ち、ディレ
クトリ中にファイルデータの追加を示すフラグ(アペン
ドフラグ)を設け、既存のファイルにデータを追加する
時には、追加すべきデータを別ファイルとして記録し、
ディレクトリ部に追加データファイル(部分ファイル)
を管理するディレクトリを、アペンドフラグをインクリ
メントして記録することにより、ファイル名が同名でア
ペンドフラグが異なるファイルはアペンドフラグの番号
順に分割記録された1つのファイルとして考えるもので
ある。
On the other hand, the applicant of the present application has disclosed a method of using an append flag as a method of adding (appending) data to a file in an information recording medium which cannot be erased and rewritten in Japanese Patent Laid-Open No. 1-258288. That is, a flag (append flag) indicating addition of file data is provided in the directory, and when data is added to an existing file, the data to be added is recorded as another file,
Additional data file (partial file) in the directory section
In the directory for managing the files, by incrementing and recording the append flag, a file having the same file name but different append flags is considered as one file divided and recorded in the order of the append flag.

【0012】図9はこのようなアペンドフラグを用いた
ファイルへのデータの追加を説明するための図で、デー
タ部を模擬的に示したものである。図9において、A、
Bはファイル名を示し、カッコ内の数値はアペンドフラ
グを示している。例えば、201はファイルAの最初の
データ(部分ファイル)を示している。同様に202は
ファイルBの最初のデータを、203はファイルAの次
のデータ、即ち、A(1)に追加されたデータを示して
いる。なお、図9には示していないが、各部分ファイル
を管理しているディクレトリがディレクトリ部に記録さ
れている。またA(1)はトラック1からmまでを、B
(1)はトラックm+1からn−1までを、A(2)は
トラックmからkまでを占めている。
FIG. 9 is a diagram for explaining the addition of data to a file using such an append flag, and schematically shows the data part. In FIG. 9, A,
B indicates the file name, and the numerical value in parentheses indicates the append flag. For example, 201 indicates the first data (partial file) of the file A. Similarly, 202 indicates the first data of the file B, and 203 indicates the next data of the file A, that is, the data added to A (1). Although not shown in FIG. 9, a directory managing each partial file is recorded in the directory section. A (1) is from track 1 to m, B is
(1) occupies tracks m + 1 to n-1 and A (2) occupies tracks m to k.

【0013】ところで、データの記録が各トラック単位
でなされているとすると、ファイルの大きさは何時でも
1トラックの容量の整数倍とは限らないので、例えば図
9のトラックm、kのように、各ファイルの最終トラッ
クには無効データ部204、205が存在するのが一般
的である。ファイルA(1)とA(2)を併せて連続的
な一つの論理的なファイルAとして考えると、その論理
的なファイル構造としては、ファイルA(2)の最初の
部分は無効データ部204に存在すべきものであり、そ
の変換を行う必要がある。
If data is recorded on a track-by-track basis, the file size is not always an integral multiple of the capacity of one track. For example, as shown in tracks m and k in FIG. Generally, invalid data sections 204 and 205 are present in the last track of each file. When the files A (1) and A (2) are considered as one continuous logical file A, the logical file structure is such that the first part of the file A (2) is the invalid data section 204. Should exist, and that conversion needs to be done.

【0014】しかし、例えば、1バイトずつデータを読
み出す場合、トラックmの最終有効バイトの次はトラッ
クnの最初のバイトを読み出す必要があり、処理が複雑
になると云う問題があった。また、データの再生は1ト
ラック毎になされるので、たとえ1トラック中に無効デ
ータ部があっても無くても、1トラックの再生に要する
時間は同じであり、追加回数が多ければそれだけ無駄な
時間が増加し、再生に時間がかかると云う問題もあっ
た。この問題は、特に追加されるファイル及び追加する
データの容量が1トラック以内のデータ容量の数分の1
と小さい場合に顕著である。例えば、ファイルサイズを
1トラックの5分の1とすれば、1回の追加には1トラ
ックを必要とするので、4回の追加を行うと最初のファ
イルを含めて5トラックを再生しないと、実際には1ト
ラックの記憶容量(1/5×5=1)に相当する全ファ
イルの内容を再生できないことになる。
However, for example, when reading data byte by byte, it is necessary to read the first byte of track n after the last valid byte of track m, which causes a problem of complicated processing. Further, since data is reproduced for each track, the time required for reproducing one track is the same even if there is no invalid data portion in one track, and the more the number of additions, the more wasteful it is. There is also a problem that the time increases and it takes time to reproduce. This problem is especially due to the fact that the amount of added files and added data is a fraction of the amount of data within one track.
And it is remarkable when small. For example, if the file size is ⅕ of one track, one track is required for one addition, so if four times addition is performed, five tracks including the first file must be reproduced. Actually, the contents of all files corresponding to the storage capacity of one track (1/5 × 5 = 1) cannot be reproduced.

【0015】そこで、本願出願人は、この問題を解決し
たファイル管理方法を、特開平4−141867号公報
で公開している。このファイル管理方法は、データがデ
ータ部の連続したトラックに順次記録され、ファイルデ
ータを管理するディレクトリ中にファイルデータの追加
を示すフラグを設け、既存のファイルにデータを追加記
録する時に、追加すべきデータを別ファイルとしてデー
タ部に順次記録し、ディレクトリ部に追加ファイルデー
タを管理するディレクトリを、前記フラグをインクリメ
ントして記録し、再生時にファイル名が同名で前記フラ
グが異なるファイルは該フラグの番号順に分割記録され
た1つのファイルとして管理するファイル管理方法にお
いて、追加データの記録時にデータの追加されるファイ
ルの最終記録トラックに無効データ部があるときには、
前記最終記録トラックに記録されているデータをバッフ
ァメモリに読みとり、前記読みとったデータの後部に新
たに追加すべきデータを追加して順次記録し、再生時
に、ファイル名が同名で前記フラグが異なるファイルの
前記フラグが最大値以外のファイルの最終記録トラック
は無効なトラックとして管理する方法である。
Therefore, the applicant of the present application has disclosed a file management method that solves this problem in Japanese Patent Application Laid-Open No. 4-141867. In this file management method, data is sequentially recorded in continuous tracks in the data section, a flag indicating addition of file data is provided in the directory for managing file data, and the flag is added when additional data is recorded in an existing file. Data is sequentially recorded as a separate file in the data section, and a directory for managing additional file data is recorded in the directory section by incrementing and recording the flag. In the file management method of managing as one file dividedly recorded in numerical order, when the additional data is recorded, when the last recording track of the file to which data is added has an invalid data part,
The data recorded on the last recording track is read into a buffer memory, data to be newly added is added to the rear portion of the read data and sequentially recorded, and at the time of reproduction, a file having the same file name but different flag The last recorded track of a file whose flag is other than the maximum value is managed as an invalid track.

【0016】[0016]

【発明が解決しようとする課題】ところで、今、上記フ
ァイル管理方法の記録時の処理を適用した結果として、
データ部を模擬的に示した時に、図3(c)のように各
ファイルデータが配置されている場合を考える。図3
(c)において、A、Bはファイル名を示し、カッコ内
の数値はアペンドフラグを示している。例えば、201
はファイルAの最初のデータ(部分ファイル)を、20
2はファイルBの最初の部分ファイルを、308、30
9はファイルAの2番目、3番目の部分ファイルを示し
ている。即ちファイルAはA(1)、A(2)、A
(3)の3つの部分ファイルから成っている。A(1)
はトラック1〜トラックmに記録されており、その最終
記録トラックmの204は無効データであり、306が
有効データである。
Now, as a result of applying the recording process of the above file management method,
Consider a case where each file data is arranged as shown in FIG. 3C when the data part is simulated. FIG.
In (c), A and B indicate the file name, and the numerical value in parentheses indicates the append flag. For example, 201
Is the first data (partial file) of file A
2 is the first partial file of file B, 308, 30
Reference numeral 9 indicates the second and third partial files of the file A. That is, the file A is A (1), A (2), A
It consists of three partial files in (3). A (1)
Are recorded on tracks 1 to m, and 204 of the last recording track m is invalid data and 306 is valid data.

【0017】また、A(2)はトラックn〜トラックj
−1に配置され、その先頭トラックnの307は1つ前
の部分ファイル、即ち、A(1)の最終トラックmの3
06のコピーとなっている。更に、最終トラックj−1
は全て有効データであり、A(2)には無効データはな
い。A(3)はトラックj〜トラックk−1に配置さ
れ、その最終トラックk−1には無効部311がある。
A(3)の1つ前の部分ファイルA(2)の最終記録ト
ラックj−1は全て有効データであるから、そのデータ
はA(3)の先頭トラックにはコピーされていない。一
方、ファイルBのB(1)は単独ファイルであり、トラ
ックm+1〜トラックn−1に配置され、全てのトラッ
クに有効データが記録されている。
A (2) is track n to track j.
-1 of the first track n is placed at -1, and the first track n of 307 is 3 in the last track m of A (1).
It is a copy of 06. Furthermore, the final track j-1
Are all valid data, and there is no invalid data in A (2). A (3) is arranged in the track j to the track k-1, and the final track k-1 has an invalid section 311.
Since the last recording track j-1 of the partial file A (2) immediately before A (3) is all valid data, that data is not copied to the head track of A (3). On the other hand, B (1) of the file B is a single file, is arranged in the tracks m + 1 to n-1, and valid data is recorded in all the tracks.

【0018】ここで、図3(c)のように各ファイルデ
ータが配置されている場合に、先のファイル管理方法の
再生時の処理を適用すると、以下のようになる。即ち、
A(3)はファイルAのアペンドフラグの最大値を持つ
部分ファイルであるから、その最終記録単位、即ち、最
終記録トラックk−1は無効な記録単位とは考えられな
い。一方、A(1)、A(2)は、そのアペンドフラグ
が最大値ではないので、その最終記録単位、即ち、トラ
ックm及びトラックj−1は無効な記録単位として管理
される。この場合、トラックmの204は始めから無効
データであり、306はA(2)中に307としてコピ
ーされているので、トラックmが無効データとして管理
されることに何等問題はない。
Here, when each file data is arranged as shown in FIG. 3C, the processing at the time of reproduction of the above file management method is applied as follows. That is,
Since A (3) is a partial file having the maximum value of the append flag of the file A, its final recording unit, that is, the final recording track k-1 cannot be considered as an invalid recording unit. On the other hand, since the append flag of A (1) and A (2) is not the maximum value, the final recording unit thereof, that is, track m and track j-1 is managed as an invalid recording unit. In this case, since track 204 has invalid data from the beginning and 306 has been copied as 307 in A (2), there is no problem in managing track m as invalid data.

【0019】しかし、トラックj−1は本来は全て有効
データであるにも拘わらず(即ち、A(3)の先頭トラ
ックにはコピーされていないにも拘わらず)、無効デー
タとして管理され、A(2)の一部のデータが失われる
ことになる。即ち、従来のファイル管理方法では、デー
タ追加前の最終ファイル(ここでの例はA(2))の最
終記録単位の全てが有効データである時にデータの追加
(ここでの例はA(3)を追加した場合)を行った場
合、その再生時に追加前の部分ファイルの最終記録単位
に記録されたデータが失われると云う問題点があった。
However, although track j-1 is originally all valid data (that is, not copied to the first track of A (3)), it is managed as invalid data and A Part of the data in (2) will be lost. That is, according to the conventional file management method, when all the final recording units of the final file before data addition (A (2) in this example) are valid data, data addition (A (3 in this example) () Is added), there is a problem that the data recorded in the final recording unit of the partial file before the addition is lost during the reproduction.

【0020】本発明は、上記従来の問題点に鑑み、デー
タの欠落を防止し、かつ何ら複雑な処理を要することな
く簡単にデータの再生を行うことが可能なファイル管理
方法を提供することを目的としたものである。
In view of the above-mentioned conventional problems, the present invention provides a file management method capable of preventing data loss and easily reproducing data without requiring any complicated processing. It is intended.

【0021】[0021]

【課題を解決するための手段】本発明の目的は、ファイ
ルデータを記録するデータ部と、前記ファイルデータを
管理するためのディレクトリを記録するディレクトリ部
とを有する記録媒体を用い、既存のファイルにデータを
追加記録する場合は、追加するデータを既存のファイル
とは別ファイルとして前記データ部に記録し、かつ該追
加ファイルデータを管理するためのディレクトリを該デ
ィレクトリに含まれるファイルデータの追加を示すフラ
グをインクリメントして前記ディレクトリ部に記録する
ことにより、ファイル名が同名でフラグが異なるファイ
ルはフラグの番号順に分割記録された1つのファイルと
して管理するファイル管理方法において、データが追加
されるファイルの最終記録単位に無効データがある場合
は、前記最終記録単位の有効データを記憶手段に読みと
り、かつ追加すべきデータを前記記憶手段の有効データ
の後に記憶させて、前記データ部に順次記録し、データ
の再生時は、ファイル名が同名でフラグが最大値以外の
ファイルであって、ファイルのサイズが所定記録単位の
整数倍でない場合は、該ファイルの最終記録単位は無効
記録単位として管理することを特徴とするファイル管理
方法によって達成される。
It is an object of the present invention to use an existing file by using a recording medium having a data section for recording file data and a directory section for recording a directory for managing the file data. When additionally recording data, the data to be added is recorded in the data section as a file different from the existing file, and a directory for managing the additional file data is added to indicate the addition of the file data included in the directory. By incrementing the flag and recording the same in the directory section, files having the same name but different flags are managed as one file divided and recorded in the order of the flag number. If there is invalid data in the final recording unit, the final recording The effective data of the order is read into the storage means, and the data to be added is stored after the effective data of the storage means and sequentially recorded in the data part, and when reproducing the data, the file name is the same name and the flag is the maximum. When the file is a value other than the value and the size of the file is not an integral multiple of the predetermined recording unit, the final recording unit of the file is managed as an invalid recording unit, which is achieved by the file management method.

【0022】[0022]

【発明の実施の形態】以下、本発明の実施例について図
面を参照して詳細に説明する。まず、図2は本発明のフ
ァイル管理方法によるファイルへのデータ記録処理を示
したフローチャートである。また、図3は光カード1の
データ部10のファイル、図4はディレクトリ部20の
ディレクトリを示しており、図3(a)、図4(a)の
状態で新たなファイルA(2)を追加記録するときの処
理を図2に基づいて説明する。図2において、まず、不
図示の情報記録再生装置に図7の光カード1をセットす
ると、追加されるファイルの最終記録単位が全て有効か
どうかがチェックされる(S201)。ここでは、図3
(a)のファイルA(1)にファイルA(2)を追加す
るので、A(1)の最終記録トラックmのデータがチェ
ックされる。このチェックの判断は、図4(a)のよう
にディレクトリ部20に記録されているファイルA
(1)を管理するためのディレクトリ301中のファイ
ル容量がトラックの容量の整数倍かどうかで判断する。
即ち、整数倍の場合は、最終記録トラックmのデータは
全て有効、整数倍でない場合は、トラックmに無効デー
タが存在すると判断する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below in detail with reference to the drawings. First, FIG. 2 is a flowchart showing a data recording process to a file by the file management method of the present invention. 3 shows a file in the data section 10 of the optical card 1 and FIG. 4 shows a directory in the directory section 20. In the state shown in FIGS. 3A and 4A, a new file A (2) is created. The process of additionally recording will be described with reference to FIG. In FIG. 2, first, when the optical card 1 of FIG. 7 is set in the information recording / reproducing device (not shown), it is checked whether all the final recording units of the file to be added are valid (S201). Here, FIG.
Since the file A (2) is added to the file A (1) of (a), the data of the final recording track m of A (1) is checked. The determination of this check is based on the file A recorded in the directory section 20 as shown in FIG.
It is determined whether the file capacity in the directory 301 for managing (1) is an integral multiple of the track capacity.
That is, if it is an integral multiple, it is determined that all data on the final recording track m is valid, and if it is not an integral multiple, invalid data exists on the track m.

【0023】この例では、図3(a)のように最終記録
トラックmに無効データ部204が存在するので、S2
01ではNOと判断され、追加されるファイルA(1)
の最終記録トラックmの有効データ部306がホストコ
ンピュータのバッファメモリ上に読みとられる(S20
2)。ホストコンピュータは情報記録再生装置の上位制
御装置であり、ホストコンピュータのバッファメモリの
データを図5に示している。401はバッファメモリ上
に読みとられたファイルA(1)の最終記録トラックm
の有効データである。次いで、図5に示すようにバッフ
ァメモリ上に読み込んだデータ401に追加すべきデー
タ402がデータ401の後に追加される(S20
3)。以上で記録すべきデータがバッファメモリ上に用
意され、この後、バッファメモリ上のデータが光カード
1のデータ部10にトラックごとに順次記録される(S
204)。本実施例では、ファイルA(2)は図3
(b)のようにトラックnからトラックj−1まで記録
される。
In this example, since the invalid data section 204 exists in the last recording track m as shown in FIG.
The file A (1) to be added is judged as NO in 01 and is added.
The valid data portion 306 of the final recording track m of the above is read into the buffer memory of the host computer (S20).
2). The host computer is a host controller of the information recording / reproducing apparatus, and the data in the buffer memory of the host computer is shown in FIG. 401 is the last recording track m of the file A (1) read on the buffer memory
Is valid data of. Next, as shown in FIG. 5, the data 402 to be added to the data 401 read on the buffer memory is added after the data 401 (S20).
3). The data to be recorded is prepared in the buffer memory as described above, and then the data in the buffer memory is sequentially recorded in the data section 10 of the optical card 1 for each track (S).
204). In this embodiment, the file A (2) is the file shown in FIG.
Tracks n to j-1 are recorded as shown in FIG.

【0024】ここで、バッファメモリ上のデータ401
は図3(b)に示すようにデータ307としてトラック
nに記録され、追加されるファイルA(1)の最終記録
トラックmの有効データはファイルA(2)の先頭トラ
ックnにデータ307としてコピーされる。また、バッ
ファメモリ400上のデータ402はデータ308とし
て記録される。最後に、図4(b)のようにファイルA
(2)を管理するためのディレクトリ303がディレク
トリ部20に記録される(S205)。この場合、ディ
レクトリ情報中のアペンドフラグはそれまでのファイル
名Aのファイルを管理するディレクトリの最大アペンド
フラグ値は“1”であるから、1インクリメントとして
“2”と記録される。
Here, the data 401 on the buffer memory
Is recorded on the track n as data 307 as shown in FIG. 3B, and the valid data of the last recording track m of the file A (1) to be added is copied as the data 307 to the first track n of the file A (2). To be done. Further, the data 402 on the buffer memory 400 is recorded as the data 308. Finally, file A as shown in FIG.
The directory 303 for managing (2) is recorded in the directory section 20 (S205). In this case, the append flag in the directory information is recorded as "2" as 1 increment because the maximum append flag value of the directory that manages the file having the file name A up to that point is "1".

【0025】次に、図3(b)のファイルに更にファイ
ルA(3)を追加記録するときの処理について説明す
る。この場合の追加されるファイルA(2)の容量は図
3(b)から明らかなように1トラックの容量の整数倍
である。この例では、S201において、ファイルA
(2)の最終記録トラックj−1のデータは全て有効デ
ータと判断される。従って、この場合は、ファイルA
(2)の最終記録トラックj−1のデータをコピーする
のは無駄であるので、コピーすることなく図5のように
バッファメモリ上に追加すべきデータ403が読みとら
れる(S206)。後は先の説明と同じで、バッファメ
モリ上のデータ403が光カード1のデータ部10に1
トラックごとに順次記録される(204)。ここでは、
図3(c)のようにトラックjからトラックk−1まで
記録される。最後に、図4(c)のようにファイルA
(3)を管理するためのディレクトリ304を記録して
処理を終了する(S205)。なお、ディレクトリ情報
中のアペンドフラグは、それまでのファイル名Aのファ
イルを管理するディレクトリの最大アペンドフラグ値は
“2”であるので、1インクリメントして“3”と記録
される。
Next, processing for additionally recording the file A (3) in the file of FIG. 3 (b) will be described. In this case, the capacity of the added file A (2) is an integral multiple of the capacity of one track, as is apparent from FIG. In this example, in S201, the file A
All the data of the final recording track j-1 of (2) are judged to be valid data. Therefore, in this case, file A
Since it is useless to copy the data of the final recording track j-1 of (2), the data 403 to be added to the buffer memory is read without copying as shown in FIG. 5 (S206). The rest is the same as the above description, and the data 403 on the buffer memory is stored in the data section 10 of the optical card 1 as 1
It is sequentially recorded for each track (204). here,
As shown in FIG. 3C, data is recorded from track j to track k-1. Finally, file A as shown in FIG.
The directory 304 for managing (3) is recorded, and the process ends (S205). Note that the append flag in the directory information is incremented by 1 and recorded as "3" because the maximum append flag value of the directory that manages the file with the file name A up to that point is "2".

【0026】次に、情報再生時にディレクトリ情報から
FATを作成する処理を図1及び図6に基づいて説明す
る。図1はディレクトリ情報からFATを作成する時の
処理の流れを示したフローチャート、図6はその処理に
より作成されたFATの内容を示した説明図である。ま
ず、不図示の情報記録再生装置に光カード1が挿入され
ると、光カード1のディレクトリ部20の全ディレクト
リが読み出され、ホストコンピュータの不図示のバッフ
ァメモリ上に記憶される(ステップ101)。この場合
は、図4(c)のようにファイルA(1)、ファイルB
(1)、ファイルA(2)、ファイルA(3)を管理す
るディレクトリ301〜304がバッファメモリ上に読
み出される。
Next, a process for creating a FAT from directory information when reproducing information will be described with reference to FIGS. 1 and 6. FIG. 1 is a flowchart showing the flow of processing when creating a FAT from directory information, and FIG. 6 is an explanatory diagram showing the contents of the FAT created by that processing. First, when the optical card 1 is inserted into an information recording / reproducing apparatus (not shown), all directories in the directory section 20 of the optical card 1 are read and stored in a buffer memory (not shown) of the host computer (step 101). ). In this case, file A (1), file B as shown in FIG.
The directories 301 to 304 for managing (1), file A (2), and file A (3) are read onto the buffer memory.

【0027】次いで、バッファメモリから1つのディレ
クトリが読み出され(ステップ102)、そのディレク
トリに対応するファイルが終わりであるかどうかが判定
される(S103)。このときは、ディレクトリを読み
だしたばかりであるので、ファイルの終わりではないと
判定され、そのディレクトリをもとにFATが作成され
る。この場合、ディレクトリ情報中の先頭トラック番号
(この場合は、トラック1)とファイル容量がわかり、
1トラックの容量も決まっているので、最終トラックも
わかる。従って、まずFAT対応領域1に次のトラック
番号2が記憶され(S104)、続いてFATの次の対
応領域2に次のトラック番号3が記憶される(S10
5)。こうしてS103〜S105の処理を繰り返し行
うことにより、図6(a)のようにFATが作成され
る。そして、S103でファイルの終わりと判定される
と、図6(a)のように最終トラックに対応する領域m
にファイルの終わりを示すFFが記憶される(S10
6)。
Next, one directory is read from the buffer memory (step 102), and it is determined whether the file corresponding to that directory is the end (S103). At this time, since the directory has just been read, it is determined that the end of the file has not been reached, and the FAT is created based on that directory. In this case, the first track number (track 1 in this case) in the directory information and the file capacity are known,
The capacity of one track is fixed, so you can see the final track. Therefore, first, the next track number 2 is stored in the FAT corresponding area 1 (S104), and then the next track number 3 is stored in the next corresponding area 2 of the FAT (S10).
5). By repeating the processing of S103 to S105 in this manner, the FAT is created as shown in FIG. Then, when it is determined in S103 that the file is at the end, the area m corresponding to the final track as shown in FIG.
The FF indicating the end of the file is stored in (S10).
6).

【0028】次に、S107でそのディレクトリの管理
するファイルが追加ファイルかどうか、即ち、アペンド
フラグが最初のファイルを示す“1”であるか否かがチ
ェックされる。この場合は、アペンドフラグは“1”で
あり、追加ファイルではないので、ステップ113へ進
んでまだバッファメモリ上に読み出していないディレク
トリがあるかどうかがチェックされる。ディレクトリが
ある場合はステップ102に戻り、ない場合にはステッ
プ114へ進む。この場合は、まだ読み出していないデ
ィレクトリがあるので、ステップ102に戻って次のデ
ィレクトリに対し同様の処理を行う。このとき、次にバ
ッファメモリ上にはディレクトリ302が読みだされる
のであるが、ディレクトリ302の管理するファイルB
(1)はファイルA(1)と同様に追加ファイルではな
いので、その処理は先に説明したディレクトリ301に
関する処理と同じ処理となる。図6(b)にディレクト
リ302に関する処理終了後のFATの状態を示してい
る。
Next, in S107, it is checked whether the file managed by the directory is an additional file, that is, whether the append flag is "1" indicating the first file. In this case, the append flag is "1" and it is not an additional file, so the routine proceeds to step 113, where it is checked whether or not there is a directory on the buffer memory that has not been read. If the directory exists, the process returns to step 102, and if it does not exist, the process proceeds to step 114. In this case, since there is a directory that has not been read yet, the process returns to step 102 and the same process is performed on the next directory. At this time, the directory 302 is read out to the buffer memory next, and the file B managed by the directory 302 is read.
Since (1) is not an additional file like the file A (1), its processing is the same as the processing relating to the directory 301 described above. FIG. 6B shows the state of the FAT after the processing regarding the directory 302 is completed.

【0029】続いて、その次のディレクトリ303が読
み出され、同様にそのディレクトリ情報をもとにFAT
が更新される。この場合は、ファイル名が以前に再生し
たものと同じAであり、アペンドフラグが“2”である
から、ステップ107で、ファイルA(1)に追加され
た情報であることがわかる。従って、このときは追加さ
れるファイルを管理するディレクトリ、即ちファイルA
(1)のディレクトリ301が再度読みだされ(ステッ
プ108)、そのファイル容量がトラック容量の整数倍
であるか否かがチェックされる(ステップ109)。こ
のチェックの結果、整数倍である場合、即ち、そのディ
レクトリの管理する部分ファイルに無効データがない場
合は、ステップ112に進み、整数倍でない場合、即
ち、そのディレクトリの管理する部分ファイルに無効デ
ータがある場合は、ステップ110に進む。
Subsequently, the next directory 303 is read out, and similarly, FAT is also based on the directory information.
Is updated. In this case, the file name is A which is the same as that previously reproduced, and the append flag is "2", so it can be seen that this is the information added to the file A (1) in step 107. Therefore, at this time, the directory that manages the added file, that is, the file A
The directory 301 of (1) is read again (step 108), and it is checked whether the file capacity is an integral multiple of the track capacity (step 109). If the result of this check is that it is an integer multiple, that is, if there is no invalid data in the partial file managed by that directory, the process proceeds to step 112. If it is not an integer multiple, that is, invalid data is found in the partial file managed by that directory. If there is, go to step 110.

【0030】ここで、本実施例のファイル管理方法にお
いては、前述のようにそのファイルへのデータ追加時
に、追加されるファイルの最終記録単位に無効データ部
がある場合は、最終記録単位の有効データは追加された
ファイルの先頭記録単位にコピーされている。従って、
ステップ110においては、追加されるファイルの最終
トラック、この例ではファイルA(1)の最終記録トラ
ックmに相当するFATの領域mが無効トラックである
ことを示す“FE”に書き換えられる。また、ステップ
111においては、最終トラックの一つ前のトラックm
−1に相当するFATの領域m−1を追加するファイル
A(2)の先頭トラックであるnに書き換えた後、ステ
ップ113以降の処理が行われる。ディレクトリ303
に関する処理を終了した時点でのFATの状態を図6
(c)に示している。
Here, in the file management method of the present embodiment, when data is added to the file as described above, if the final recording unit of the file to be added has an invalid data section, the last recording unit is valid. The data is copied in the first recording unit of the added file. Therefore,
In step 110, the final track of the file to be added, in this example, the area m of the FAT corresponding to the final recording track m of the file A (1) is rewritten to "FE" indicating that it is an invalid track. In step 111, the track m immediately before the last track
After rewriting the area m-1 of the FAT corresponding to -1 to the head track n of the file A (2) to be added, the processing from step 113 onward is performed. Directory 303
FIG. 6 shows the state of the FAT at the time when the processing relating to FIG.
(C).

【0031】続いて、その次のディレクトリ304がバ
ッファメモリに読みだされ、同様の処理を行う。この場
合は、ステップ107で追加ファイルであることがわか
るので、ステップ108、109で同様の処理を行う。
即ち、ステップ109では、A(2)のファイルサイズ
はトラック容量の整数倍であるから、ステップ112に
進み、追加されるファイルの最終記録単位、この例では
ファイルA(2)の最終トラックj−1に相当するFA
Tの領域j−1を、追加するファイルA(3)の先頭ト
ラックであるjに書き換えてステップ113へ進む。デ
ィレクトリ304に関する処理を終了した時点でのFA
Tを図6(c)に示している。この時点でバッファメモ
リ中に読み出されていないディレクトリは存在しないの
で、ステップ114で、FATの残り全てに未使用を示
す“00”を記録してFATの作成を終了する。最終的
なFATを図6(e)に示している。
Then, the next directory 304 is read into the buffer memory and the same processing is performed. In this case, since it is found in step 107 that the file is an additional file, similar processing is performed in steps 108 and 109.
That is, in step 109, since the file size of A (2) is an integral multiple of the track capacity, the process proceeds to step 112, and the final recording unit of the file to be added, in this example the final track j- of file A (2). FA equivalent to 1
The area j-1 of T is rewritten to j which is the head track of the file A (3) to be added, and the process proceeds to step 113. FA at the time when the processing related to the directory 304 is completed
T is shown in FIG. At this point, there is no unread directory in the buffer memory, so in step 114, "00" indicating unused is recorded in all the remaining FATs, and the creation of the FAT ends. The final FAT is shown in FIG.

【0032】次に、このように作成されたFATを用い
て光カード1のデータを再生するときの動作について説
明する。まず、ファイルAは物理的には3つに分割記録
されているが、論理的には1つのファイルである。この
ファイルAを再生する場合、FATに従ってトラック1
から順次トラックm−1まで再生される。次いで、FA
Tの領域m−1には、そのファイルの続きの情報はトラ
ックnに記録されている旨の情報があるので、トラック
mを再生することなくトラックnが再生され、続いてト
ラックn+1から順次トラックj−1まで再生される。
FATの領域j−1には、そのファイルの続きの情報は
トラックjに記録されている旨の情報があるので、更に
トラックjからトラックk−1まで、FATにファイル
の終わりを示す“FF”が記録されているトラックまで
連続的に再生される。
Next, the operation of reproducing the data of the optical card 1 by using the FAT thus created will be described. First, the file A is physically divided into three, but is logically one file. When playing back this file A, track 1 is followed according to FAT.
To the track m-1 are sequentially reproduced. Then FA
In the area m-1 of T, there is information indicating that the following information of the file is recorded in the track n, so that the track n is reproduced without reproducing the track m, and then the track n + 1 is sequentially recorded. Plays up to j-1.
In the area j-1 of the FAT, there is information that the following information of the file is recorded on the track j, and therefore, from the track j to the track k-1, "FF" indicating the end of the file is displayed in the FAT. Is continuously reproduced up to the track on which is recorded.

【0033】ここで、トラックnの先頭にはトラックm
に記録されていた有効データ306がデータ307とし
てコピーされているので、データの欠落なしに連続的に
追加された情報を再生することができる。しかも、各ト
ラックのデータは全てが有効データのみであり、有効デ
ータと無効データの混在するトラック(例えば、トラッ
クm)はアクセスしないので、1トラックのデータ中ど
こまで有効かを考慮した複雑な処理をすることなく、単
にFATの示す情報に従って順次再生することができ
る。また、従来のファイル管理方法のように、部分ファ
イルのファイルサイズがトラック容量の整数倍である場
合、即ち、部分ファイルに無効データ部がない場合に、
その最終記録単位(この例ではファイルA(2)のトラ
ックj−1)に記録されている有効データが無効なデー
タとして管理されてしまい、データが欠落するという問
題も生じない。
Here, track m is at the beginning of track n.
Since the valid data 306 recorded in (1) is copied as the data 307, it is possible to reproduce the continuously added information without loss of data. Moreover, since all the data on each track are only valid data, and a track in which valid data and invalid data are mixed (for example, track m) is not accessed, complicated processing is performed considering how valid the data of one track is. It is possible to sequentially reproduce the information simply according to the information indicated by the FAT. Also, like the conventional file management method, when the file size of the partial file is an integral multiple of the track capacity, that is, when the partial file has no invalid data part,
The valid data recorded in the final recording unit (track j-1 of the file A (2) in this example) is managed as invalid data, and there is no problem of data loss.

【0034】更に、本実施例では、ファイルの最終トラ
ックに無効データ部がある場合は、ファイルの最終記録
トラックの情報を更新できると云う利点もある。即ち、
最終記録トラックに無効データ部がある場合は、前述の
ように最終トラックのデータは一度バッファメモリ中に
読み出されるので、この時点でメモリ上でそのデータを
更新すれば、更新後のデータを追加ファイルの先頭に記
録でき、データの論理的な更新が可能である。もし、フ
ァイルの大きさが(1トラックの容量−1バイト)以内
であれば、全てのデータは更新可能である。なお、この
場合、ディレクトリ情報としては更新前のファイルを管
理するディレクトリが存在することになり、ファイル名
が同じでアペンドフラグが異なるディレクトリが更新回
数分存在し、全ての同名のファイルが追加された1つの
ファイルとして認識されるが、FATの最大アペンドフ
ラグ番号以外のファイルに対応する領域には無効トラッ
クを示すマーク“FE”が記録されるので、結果とし
て、最終追加(実際には更新)ファイルのデータのみが
再生可能である。
Further, the present embodiment has an advantage that the information of the last recorded track of the file can be updated when the last track of the file has an invalid data portion. That is,
If the last recorded track has an invalid data section, the data of the last track is read once into the buffer memory as described above, so if you update that data in the memory at this point, the updated data will be added to the additional file. It is possible to record at the beginning of the, and it is possible to logically update the data. If the size of the file is (capacity of one track-1 byte), all data can be updated. In this case, as directory information, there is a directory that manages files before update, and there are directories with the same file name but different append flags for the number of updates, and all files with the same name have been added. Although it is recognized as one file, the mark "FE" indicating an invalid track is recorded in the area corresponding to the file other than the maximum append flag number of FAT. As a result, the last added (actually updated) file Only the data of can be reproduced.

【0035】また、追加されるファイル及び追加するデ
ータの容量が1トラック以内のデータ容量のN(Nは整
数)数分の1と小さい場合、N−1回の追加で全ファイ
ル容量が1トラックの容量に達する迄は、従来のように
N本のトラックを再生する必要がなく、FATの情報を
基に最終追加ファイルが記録されている1トラックのみ
を再生すれば、全ファイルのデータが得られるし、たと
えM(MはM>Nの整数)回の追加により複数のトラッ
クに渡っても、従来のように追加された全てのトラック
M本を再生する必要はない。即ち、追加によって1トラ
ック全てが有効データとなったトラック(その本数は、
int()をカッコ内の値の整数部を与えるものとする
とき、int(M/N)で表せる)及び、ファイルの最
終トラックのみを再生すればよく(従って、その再生ト
ラック本数はint(M/N)+1であり、これは明ら
かにMより小さいので)、再生トラック本数が少なくて
済み、再生に要する時間を短縮できると云う利点もあ
る。
If the capacity of the file to be added and the data to be added is a small fraction of N (N is an integer) of the data capacity within 1 track, the total file capacity is 1 track by adding N-1 times. It is not necessary to play N tracks as before until the capacity of is reached, and the data of all files can be obtained by playing only one track in which the last additional file is recorded based on the FAT information. However, it is not necessary to reproduce all the added M tracks as in the conventional case, even if the tracks are added by M times (M is an integer of M> N) times. That is, all the tracks that have become valid data by the addition (the number of tracks is
When int () is an integer part of the value in parentheses, it can be represented by int (M / N)) and only the last track of the file is reproduced (therefore, the number of reproduced tracks is int (M / N)). / N) +1, which is obviously smaller than M), and has the advantage that the number of reproduction tracks is small and the time required for reproduction can be shortened.

【0036】なお、以上の実施例では、最小記録単位及
び管理単位は1トラックであるものとして説明したが、
これはトラックに限らず、セクタあるいはクラスタであ
っても良い。また、実施例では、2回の追加のあった場
合を例に説明したが、それ以上の追加のあった場合は、
同様の処理を繰り返せば良い。更に、実施例では、再生
時に光カード上の全てのディレクトリを一旦バッファメ
モリに読み取った後にディレクトリを1個づつバッファ
メモリから読みだして処理を行ったが、これは処理中に
同じディレクトリを2回読み出す必要があり、光カード
から読み取るよりはバッファメモリから読みだした方が
処理速度が速いためであるが、処理速度を問題にしない
場合、あるいはバッファメモリを節約したい場合には、
毎回光カード上から読み取るようにしても良い。
In the above embodiments, the minimum recording unit and the management unit are one track.
This is not limited to tracks, but may be sectors or clusters. Further, in the embodiment, the case where two additions are made has been described as an example, but when there are more additions,
The same process may be repeated. Further, in the embodiment, at the time of reproduction, all the directories on the optical card are once read into the buffer memory and then the directories are read one by one from the buffer memory for processing, but the same directory is read twice during processing. This is because it is necessary to read, and the processing speed is faster when reading from the buffer memory than when reading from the optical card, but if the processing speed does not matter or you want to save the buffer memory,
It may be read from the optical card every time.

【0037】更に、実施例では、説明を簡単にするため
に管理するファイルのサイズが0バイトのディレクトリ
は存在しないものとした。しかし、情報記録再生装置が
MS−DOSなどのオペレィティング・システムで制御
された場合は、管理するファイルのサイズが0バイトの
ディレクトリが記録される可能性がある。この場合に
は、ディレクトリが管理するファイルの実体がない訳で
あるから、図1のステップ103及びステップ109の
前に、ステップ102及びステップ108で読みだした
ディレクトリの管理するファイル容量が0バイトかどう
かをチェックするステップをそれぞれ設け、0バイトで
なければ、次のステップ(ステップ103及びステップ
109)に進み、0バイトであれば、一切のFATの作
成処理を行わず、直接ステップ113に進む処理を追加
すれば良い。
Further, in the embodiment, for the sake of simplicity of explanation, it is assumed that there is no directory whose file size is 0 bytes. However, when the information recording / reproducing apparatus is controlled by an operating system such as MS-DOS, there is a possibility that a directory whose managed file size is 0 byte is recorded. In this case, since there is no entity of the file managed by the directory, whether the file capacity managed by the directory read in steps 102 and 108 is 0 bytes before steps 103 and 109 in FIG. A step for checking whether or not each is provided, and if it is not 0 bytes, proceed to the next step (step 103 and step 109). If it is 0 byte, no FAT creation processing is performed and the processing proceeds directly to step 113. Should be added.

【0038】[0038]

【発明の効果】以上説明したように本発明によれば、デ
ータの追加されたファイルを記録単位毎に再生する場
合、FATに従って先頭記録単位から順次再生するのみ
で連続的に追加された情報の再生が可能となり、しかも
再生される各記録単位のデータは一番最後の部分ファイ
ルの最終記録単位以外は全て有効データのみであるか
ら、複雑な処理をすることなく、単にFATの示す情報
に従って順次再生するだけで簡単に再生することができ
る。また、従来のように部分ファイルのファイルサイズ
が記録単位の容量の整数倍であっても、その最終記録単
位に記録されている有効データが無効なデータとして管
理されてしまい、データが欠落すると云う問題は生じな
い。
As described above, according to the present invention, when a file to which data has been added is reproduced for each recording unit, the information added continuously is reproduced only by sequentially reproducing from the first recording unit according to FAT. Reproduction is possible, and the data of each recording unit to be reproduced is only valid data except for the final recording unit of the last partial file. Therefore, without performing any complicated processing, simply follow the information indicated by the FAT. You can easily play it just by playing it. Even if the file size of the partial file is an integral multiple of the capacity of the recording unit as in the conventional case, the valid data recorded in the final recording unit is managed as invalid data and the data is lost. There is no problem.

【0039】更に、消去書換不可能な媒体であっても、
ファイルの最終記録単位に無効データ部がある場合は、
ファイルの最終記録単位の情報を論理的に更新できると
云う利点もあり、特にファイルの大きさが(記録単位の
容量−1バイト)以内であれば、全てのデータが論理的
に更新可能である。また、追加されるファイル及び追加
するデータの容量が記録単位のデータ容量の数分の1と
小さい場合は、追加されたファイル全体を再生する為の
再生記録単位の数が少なくて済み、再生に要する時間を
短縮できると云う利点等、多くの利点を有する。
Furthermore, even if the medium cannot be erased and rewritten,
If the last recording unit of the file has an invalid data section,
There is also an advantage that the information of the final recording unit of the file can be logically updated. Especially, if the size of the file is (capacity of recording unit-1 byte) or less, all data can be logically updated. . In addition, when the capacity of the added file and the data to be added is a small fraction of the data capacity of the recording unit, the number of reproduction recording units for reproducing the entire added file is small, There are many advantages such as the advantage that the time required can be shortened.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明のファイル管理方法におけるディレクト
リ情報からFATを作成する時の処理を示したフローチ
ャートである。
FIG. 1 is a flowchart showing a process of creating a FAT from directory information in the file management method of the present invention.

【図2】本発明のファイル管理方法によるファイルへの
データ追加記録時の処理を示したフローチャートであ
る。
FIG. 2 is a flowchart showing a process at the time of additional recording of data to a file according to the file management method of the present invention.

【図3】光カードのデータ部のファイルを示した図であ
る。
FIG. 3 is a diagram showing a file of a data section of an optical card.

【図4】光カードのディレクトリ部のディレクトリを示
した図である。
FIG. 4 is a diagram showing a directory in a directory portion of an optical card.

【図5】ホストコンピュータのバッファメモリ上のデー
タを示した図である。
FIG. 5 is a diagram showing data on a buffer memory of a host computer.

【図6】図1のフローチャートに従って作成されるFA
Tを示した図である。
6 is an FA created according to the flowchart of FIG.
It is the figure which showed T.

【図7】光カードの一例を示した概略的平面図である。FIG. 7 is a schematic plan view showing an example of an optical card.

【図8】FATの概念を説明するための図である。FIG. 8 is a diagram for explaining the concept of FAT.

【図9】従来のアペンドフラグを用いたファイルへのデ
ータの追加を説明するための図である。
FIG. 9 is a diagram for explaining addition of data to a file using a conventional append flag.

【符号の説明】[Explanation of symbols]

10 データ部 20 ディレクトリ部 30 FAT 201、202、308、309 ファイル 204、205、311 無効データ部 306、310 有効データ部 400 バッファメモリ 301、302、303、304 ディレクトリ 10 data part 20 directory part 30 FAT 201, 202, 308, 309 file 204, 205, 311 invalid data part 306, 310 valid data part 400 buffer memory 301, 302, 303, 304 directory

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 ファイルデータを記録するデータ部と、
前記ファイルデータを管理するためのディレクトリを記
録するディレクトリ部とを有する記録媒体を用い、既存
のファイルにデータを追加記録する場合は、追加するデ
ータを既存のファイルとは別ファイルとして前記データ
部に記録し、かつ該追加ファイルデータを管理するため
のディレクトリを該ディレクトリに含まれるファイルデ
ータの追加を示すフラグをインクリメントして前記ディ
レクトリ部に記録することにより、ファイル名が同名で
フラグが異なるファイルはフラグの番号順に分割記録さ
れた1つのファイルとして管理するファイル管理方法に
おいて、データが追加されるファイルの最終記録単位に
無効データがある場合は、前記最終記録単位の有効デー
タを記憶手段に読みとり、かつ追加すべきデータを前記
記憶手段の有効データの後に記憶させて、前記データ部
に順次記録し、データの再生時は、ファイル名が同名で
フラグが最大値以外のファイルであって、ファイルサイ
ズが所定記録単位の整数倍でない場合は、該ファイルの
最終記録単位は無効記録単位として管理することを特徴
とするファイル管理方法。
1. A data section for recording file data,
When additionally recording data in an existing file using a recording medium having a directory section for recording a directory for managing the file data, the data to be added is stored in the data section as a file different from the existing file. By recording a directory for recording and managing the additional file data in the directory portion by incrementing a flag indicating addition of file data included in the directory, files having the same file name but different flags are recorded. In the file management method of managing as one file dividedly recorded in the order of the flag numbers, when the final recording unit of the file to which data is added has invalid data, the valid data of the final recording unit is read into the storage means, In addition, the data to be added is stored in the effective data of the storage means. When the data is reproduced, the file name is the same and the flag is other than the maximum value, and the file size is not an integral multiple of the predetermined recording unit. A file management method characterized in that the final recording unit of the file is managed as an invalid recording unit.
JP7170817A 1995-07-06 1995-07-06 File management method Pending JPH0922375A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7170817A JPH0922375A (en) 1995-07-06 1995-07-06 File management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7170817A JPH0922375A (en) 1995-07-06 1995-07-06 File management method

Publications (1)

Publication Number Publication Date
JPH0922375A true JPH0922375A (en) 1997-01-21

Family

ID=15911889

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7170817A Pending JPH0922375A (en) 1995-07-06 1995-07-06 File management method

Country Status (1)

Country Link
JP (1) JPH0922375A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010020576A (en) * 2008-07-11 2010-01-28 Nikon Corp Recording control device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010020576A (en) * 2008-07-11 2010-01-28 Nikon Corp Recording control device

Similar Documents

Publication Publication Date Title
JPH04141867A (en) File managing method
US5442611A (en) Method of recording information on record medium having data record region and file management information record region
JP2915307B2 (en) Information recording control method for optical disk
AU707161B2 (en) Compact disc recording system and method
JP3005645B2 (en) How to read and write files on non-erasable storage media
US5666531A (en) Recordable CDROM accessing system
JP4801314B2 (en) Method and apparatus for storing data in or reading data from a storage medium, and storage medium
JP3135531B2 (en) Recording medium for storing additional information for defect management and defect management method
JP2006073196A (en) Data read/write method for compact disk medium
US5422871A (en) Method and apparatus for producing an optical disk having a read-only area and a rewritable area
JP4310120B2 (en) System and method for information control block tracking stream for universal disk format file system
JPH0346164A (en) Alternative sector managing system and information recording and reproducing system
JPH11306545A (en) Optical disc for av and record method therefor
JPH0922375A (en) File management method
JP2581003B2 (en) Recording disk controller
JP2003173285A (en) Information recording method and information record reproduction device
KR20020025202A (en) Disk medium managing method
JPH03217972A (en) File retrieving device
JPH03166634A (en) Information recording/reproducing system
JP2784650B2 (en) Optical disk storage management method
JP2649675B2 (en) Optical disk storage management method
JPH05342817A (en) File management method and information recording and reproducing device
JP2001043662A (en) Disk medium managing method
JP2689116B2 (en) Optical disk storage management method
JP3936839B2 (en) Data storage system