JP2006309400A - Program and device for managing file - Google Patents
Program and device for managing file Download PDFInfo
- Publication number
- JP2006309400A JP2006309400A JP2005129521A JP2005129521A JP2006309400A JP 2006309400 A JP2006309400 A JP 2006309400A JP 2005129521 A JP2005129521 A JP 2005129521A JP 2005129521 A JP2005129521 A JP 2005129521A JP 2006309400 A JP2006309400 A JP 2006309400A
- Authority
- JP
- Japan
- Prior art keywords
- file
- cluster
- cluster chain
- item
- field
- 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.)
- Withdrawn
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、FATファイルシステムに基づいて、ファイルデータを記録するファイル管理プログラム、及びファイル管理装置に関する。 The present invention relates to a file management program and a file management apparatus for recording file data based on a FAT file system.
従来、ファイル管理プログラムとしては、例えば、マイクロソフト社のオペレーティングシステム(Windows(登録商標)やMS-DOS(登録商標)) に搭載されたファイルシステム、つまり、FATファイルシステムが知られている(例えば特許文献1参照)。
このようなファイル管理プログラムにあっては、一般に、ファイルデータの記録に使用される領域のサイズが1つのクラスタ領域のサイズより小さい場合には、ファイルデータを1つのクラスタ領域に格納する。また、その領域のサイズが、1つのクラスタのサイズより大きい場合には、途中までのファイルデータを格納したクラスタ領域に引き続くクラスタ領域を新しく確保し、その確保されたクラスタ領域に継続してファイルデータを格納する。なお、クラスタ領域が新しく確保された場合には、その新しく確保されたクラスタ領域のクラスタ番号のリンク状態を、クラスタチェーンとして、FATに記録する。
In such a file management program, generally, when the size of an area used for recording file data is smaller than the size of one cluster area, the file data is stored in one cluster area. In addition, if the size of the area is larger than the size of one cluster, a new cluster area following the cluster area storing the file data up to the middle is secured, and the file data continues in the secured cluster area. Is stored. When a new cluster area is secured, the link state of the cluster number of the newly secured cluster area is recorded in the FAT as a cluster chain.
しかしながら、上記従来のファイル管理プログラムにあっては、ファイルデータをFATで管理するようになっているため、例えば、低消費電力化や小型化といった要求のために、ハードウエア性能に厳しい制約がある組み込み機器に適用した場合、ファイルデータのクラスタチェーンの解析処理に、多くの時間が掛かってしまう恐れがあった。
本発明は、上記従来技術の未解決の問題点を解決することを目的とするものであって、クラスタチェーンに関するソフトウェア(ファームウェア)処理を高速化することが可能なファイル管理プログラム、及びファイル管理装置を提供することを課題とする。
However, in the above conventional file management program, since file data is managed by FAT, there are severe restrictions on hardware performance due to demands for low power consumption and miniaturization, for example. When applied to an embedded device, the analysis processing of the cluster chain of file data may take a lot of time.
An object of the present invention is to solve the above-mentioned unsolved problems of the prior art, and a file management program and a file management apparatus capable of speeding up software (firmware) processing relating to a cluster chain It is an issue to provide.
上記課題を解決するために、本発明のファイル管理プログラムは、FATファイルシステムに基づき、各ファイルデータをクラスタチェーンを用いて記録するファイル管理プログラムであって、前記ファイルデータを格納しているクラスタを示すクラスタチェーン情報を、当該クラスタチェーン情報を記録するためのファイルクラスタチェーン項目に記録する記録機能をコンピュータに実行させることを特徴とする。 In order to solve the above problems, a file management program according to the present invention is a file management program for recording each file data using a cluster chain based on the FAT file system, wherein a cluster storing the file data is recorded. A computer is caused to execute a recording function of recording the indicated cluster chain information in a file cluster chain item for recording the cluster chain information.
また、前記ファイルクラスタチェーン項目から前記クラスタチェーン情報を取得する情報取得機能をコンピュータに実行させるようにしてもよい。
また、本発明のファイル管理装置は、FATファイルシステムに基づき、各ファイルデータをクラスタチェーンを用いて記録するファイル管理装置であって、前記ディレクトリ項目を格納しているクラスタを示すクラスタチェーン情報を、当該クラスタチェーン情報を記録するためのファイルクラスタチェーン項目に記録する記録手段を備えたことを特徴とする。
Further, an information acquisition function for acquiring the cluster chain information from the file cluster chain item may be executed by a computer.
The file management apparatus of the present invention is a file management apparatus for recording each file data using a cluster chain based on the FAT file system, and includes cluster chain information indicating a cluster storing the directory item. Recording means for recording in a file cluster chain item for recording the cluster chain information is provided.
さらに、前記ファイルクラスタチェーン項目から前記クラスタチェーン情報を取得する情報取得手段を備えるようにしてもよい。
このような構成によれば、ファイルデータが複数のクラスタ領域にまたがって記録されているときに(クラスタチェーンがあるとき)に、クラスタチェーンの解析が必要な処理を行う場合には、ファイルクラスタチェーン項目のフィールド値を解析させることで、クラスタチェーン情報を取得させることができる。そのため、例えば、FATを参照させることでクラスタチェーン情報を取得させる方法に比べ、クラスタチェーンに関するソフトウェア(ファームウェア)処理の高速化(改善)を図ることが可能である。
Furthermore, information acquisition means for acquiring the cluster chain information from the file cluster chain item may be provided.
According to such a configuration, when file data is recorded across a plurality of cluster areas (when there is a cluster chain), when performing processing that requires analysis of the cluster chain, the file cluster chain By analyzing the field value of the item, the cluster chain information can be acquired. Therefore, for example, it is possible to increase the speed (improvement) of software (firmware) processing related to the cluster chain, compared to a method of acquiring cluster chain information by referring to the FAT.
以下、本発明のファイル管理プログラムの実施形態として、画像データを生成可能なCCDカメラ等の撮像ユニットを備える携帯端末に適用した例を図面に基づいて説明する。
即ち、この携帯端末1にあっては、撮像ユニットで画像データが生成されると、その画像データのファイルデータを格納する。なお、その際、ファイルデータが複数のクラスタに格納された場合には、当該クラスタのクラスタ番号を示すフィールド値をファイルクラスタチェーン項目(本発明で新しく設けた項目)のクラスタチェーン情報フィールドに記録する。そして、この携帯端末1にあっては、クラスタチェーンの解析が必要な処理を実行するときに、FATを解析することなく、処理対象であるファイルに対応するファイルクラスタチェーン項目を解析することで、前記処理を効率的に実行することができる。
Hereinafter, as an embodiment of a file management program of the present invention, an example applied to a portable terminal including an imaging unit such as a CCD camera capable of generating image data will be described with reference to the drawings.
That is, in the
<携帯端末の構成>
図1は、本実施形態の携帯端末の内部構成を示すブロック図である。この図1に示すように、携帯端末1は、撮像ユニット2、文字入力ユニット3、メモリーカードユニット4、表示ユニット5、I/F(Interface)6、CPU(Central Processing Unit)7、RAM(Random Access Memory)8及びROM(Read Only Memory)9を含んで構成される。そして、携帯端末1は、撮像ユニット2、文字入力ユニット3、メモリーカードユニット4及び表示ユニット5を除く各部が、バス10で互いに接続される。
<Configuration of mobile terminal>
FIG. 1 is a block diagram illustrating an internal configuration of the mobile terminal according to the present embodiment. As shown in FIG. 1, a
撮像ユニット2は、背面側の平面視上部に配され、CCDカメラ(不図示)を含んで構成される。そして、撮像ユニット2は、所定の操作がされると、被写体の画像データをCCDカメラで生成し、その画像データをI/F6経由でCPU7に出力する。
また、文字入力ユニット3は、前面側の平面視下部に配され、任意の文字列を入力可能なキーボード(不図示)を含んで構成される。そして、文字入力ユニット3は、そのキーボードから入力される文字列の情報をI/F6経由でCPU7に出力する。
The
The
さらに、メモリーカードユニット4は、平面視左端部に配され、電力供給を停止してもデータを保持可能な不揮発性のメモリーカード(不図示)が着脱可能に構成される。そして、メモリーカードユニット4は、CPU7からファイル格納指令(後述)が出力されると、CPU7で生成されたファイル(後述)をメモリーカードに記録する。
また、メモリーカードユニット4は、CPU7からディレクトリ項目記録指令(後述)が出力されると、後述するようにCPU7で生成されるフィールド値をファイルクラスタチェーン項目のクラスタチェーン情報フィールドに記録し、また、CPU7で生成されるファイル名のディレクトリ項目をメモリーカードに記録する。さらに、メモリーカードユニット4は、CPU7からI/F6経由でディレクトリ項目読出指令(後述)が出力されると、そのディレクトリ項目読出指令で指定されるファイルのファイル名のディレクトリ項目を、メモリーカードから読み出してI/F6経由でCPU7に出力する。
Furthermore, the
Further, when a directory item recording command (described later) is output from the
さらに、表示ユニット5は、前面側の平面視中央部に配され、任意の画像を表示可能な表示装置(不図示)を含んで構成される。そして、表示ユニット5は、CPU7からI/F6経由で処理結果が出力されると、その出力された処理結果を表示装置に表示させる。
また、I/F6は、携帯端末1が備える各ユニット2〜5間や、各ユニット2〜5とCPU7との間で授受されるデータを受信側2〜5、7が読込可能な形式に変換する。
Furthermore, the
In addition, the I / F 6 converts the data exchanged between the
さらに、CPU7は、ROM9に記録されている基本制御プログラム(OS:Operating System)や、アプリケーションプログラム等の各種プログラムを読み出し、それら読み出された各種プログラムを実行して、携帯端末1が備える各部2〜9を制御する。
また、CPU7は、撮像ユニット2から画像データが出力されると、その出力された画像データのファイルデータを生成する。また、CPU7は、その生成されたファイルデータ(以下、「新生成ファイルデータ」とも呼ぶ。)を記録するディレクトリのファイルパス、及び新生成ファイルデータのファイル名として文字入力ユニット3から文字列の情報が入力されると、その新生成ファイルデータをメモリーカードに記録させる指令(以下、「ファイル格納指令」とも呼ぶ。)をI/F6経由でメモリーカードユニット4に出力し、また同時に、書き込み処理(後述)を実行する。そして、CPU7は、書き込み処理が実行されると、ファイルデータが複数のクラスタに格納されたか否かを判定する。複数のクラスタに格納された場合には、当該クラスタのクラスタ番号を示すフィールド値をファイルクラスタチェーン項目のクラスタチェーン情報フィールドに記録させ、さらに、前記ファイル名のディレクトリ項目を記録させるディレクトリ項目記録指令をI/F6経由でメモリーカードユニット4に出力してから、この演算処理を終了する。なお、ファイルデータが大きく、書き込み処理の実行中に、前記ファイルクラスタチェーン項目の全クラスタチェーン情報フィールドにフィールド値が書き込まれて埋まった場合には、前記ファイルクラスタチェーン項目に引き続くファイルクラスタチェーン項目を確保し、その確保されたファイルクラスタチェーン項目にフィールド値を引き続き書き込む。
Further, the
Further, when the image data is output from the
具体的には、ファイルクラスタチェーン項目は、図2に示すように、インデックスフィールド、クラスタチェーン情報フィールド、予約フィールド、属性フィールド、及びチェックサムフィールドで構成される。
インデックスフィールドには、ファイルクラスタチェーン項目の番号(何番目のファイルクラスタチェーン項目であるのかを示す番号)を16進数表記したものを設定する。なお、最後のファイルクラスタチェーン項目には、ファイルクラスタチェーン項目の終端を示すビット(ビット6)を設定する。そのため、このビットを、ファームウェアの内部処理のチェックフラグとして利用でき、安全性を高めることができる。
Specifically, as shown in FIG. 2, the file cluster chain item includes an index field, a cluster chain information field, a reservation field, an attribute field, and a checksum field.
In the index field, a file cluster chain item number (a number indicating the number of the file cluster chain item) expressed in hexadecimal is set. In the last file cluster chain item, a bit (bit 6) indicating the end of the file cluster chain item is set. Therefore, this bit can be used as a check flag for the internal processing of the firmware, and safety can be improved.
クラスタチェーン情報フィールドには、サブディレクトリ識別項目の先頭クラスタ番号フィールドのフィールド値が示すクラスタ(先頭クラスタ)に引き続くクラスタのクラスタ番号を16進数表記したものを設定する。なお、クラスタチェーン情報フィールドの領域は、FAT32では4バイト(32ビット)、FAT16では2バイト(16ビット)、FAT12では3バイト(24ビット、注:フィールド情報は2個分が入る(12ビット×2)とする。また、クラスタチェーン情報フィールドの数(ディレクトリ項目に記録可能なクラスタの数)は、FAT32では6個、FAT16では13個、FAT12では16個(8個のフィールドに2情報)とする。 In the cluster chain information field, a hexadecimal representation of the cluster number of the cluster following the cluster (first cluster) indicated by the field value of the first cluster number field of the subdirectory identification item is set. The area of the cluster chain information field is 4 bytes (32 bits) for FAT32, 2 bytes (16 bits) for FAT16, 3 bytes (24 bits for FAT12, Note: 2 fields information is included (12 bits × 2) The number of cluster chain information fields (number of clusters recordable in the directory item) is 6 for FAT32, 13 for FAT16, and 16 for FAT12 (2 information in 8 fields). To do.
予約フィールドには、FATファイルシステムのロングファイルネーム項目(VFAT動作時に、ロングファイルネームを表すディレクトリ項目)と同じものを設定する。
属性フィールドには、このディレクトリ項目が、クラスタチェーン項目であることを示す情報(例えば、「0x0F&0x20」)を設定する。なお、ロングファイルネーム項目の属性フィールドには、フィールド値「0x0F」が設定される。
In the reserved field, the same field as the long file name item of the FAT file system (directory item representing the long file name during the VFAT operation) is set.
Information (for example, “0x0F & 0x20”) indicating that this directory item is a cluster chain item is set in the attribute field. The field value “0x0F” is set in the attribute field of the long file name item.
チェックサムフィールドには、ショートファイルネームを表すディレクトリ項目のチェックサムと一致しない数値「0x00」を設定する。なお、ロングファイルネーム項目のチェックサムフィールドには、通常、前記チェックサムと一致する数値が設定される。
したがって、VFATが搭載されていない動作環境では、属性フィールドの下位4ビット「0x0F」により、このディレクトリ項目は無視される。なお、本実施形態では、属性フィールドに「0x0F&0x20」を設定する例を示したが、これに限られるものではなく、ファイルクラスタチェーン項目であることを示す他の情報でもよい。
In the checksum field, a numerical value “0x00” that does not match the checksum of the directory item representing the short file name is set. In the checksum field of the long file name item, a numerical value that matches the checksum is normally set.
Therefore, in an operating environment in which VFAT is not installed, this directory item is ignored by the lower 4 bits “0x0F” of the attribute field. In this embodiment, an example in which “0x0F & 0x20” is set in the attribute field is shown, but the present invention is not limited to this, and other information indicating a file cluster chain item may be used.
また同様に、VFATが搭載されている動作環境にあっても、チェックサムフィールドのフィールド値(ショートファイルネームを表すディレクトリ項目のチェックサムと一致しないフィールド値「0x00」)により、このディレクトリ項目は無視される。
また、CPU7は、メモリーカードに記録されているファイルデータに、クラスタチェーンの解析が必要な処理を実行するために、処理対象となるファイルのファイルパスとして文字入力ユニット3から文字列の情報が入力されると読み込み処理(後述)を実行する。そして、CPU7は、読み込み処理が実行されると、ディレクトリ項目読出指令をI/F6経由でメモリーカードユニット4に出力して、前記ファイルに対応するファイル項目及びファイルクラスタチェーン項目を読み出す。また、CPU7は、その読み出されたファイルクラスタチェーン項目からクラスタチェーン情報フィールドのフィールド値を読み出して前記処理を実行し、その処理結果を表示ユニット5に表示させてから、この読み込み処理を終了する。なお、読み込み処理の実行中に、前記ファイルクラスタチェーン項目のクラスタチェーン情報フィールドのフィールド値を全て読み出し終えた場合には、前記ファイルクラスタチェーン項目に引き続くファイルクラスタチェーン項目を読み出し、その読み出されたファイルクラスタチェーン項目のフィールド値を引き続き読み出す。
Similarly, even in an operating environment equipped with VFAT, this directory item is ignored due to the field value of the checksum field (the field value “0x00” that does not match the checksum of the directory item representing the short file name). Is done.
Further, the
さらに、RAM8は、CPU7で実行される各種プログラムを展開するためのワークエリアと、それら各種プログラムの実行時に用いられるデータを記録するためのメモリ領域とを形成する。そして、RAM8は、CPU7から読み出し要求が出力されると、RAM8に記録されているデータから当該読み出し要求に応じたデータをCPU7に出力する。
また、ROM9は、CPU7で実行される各種プログラムとデータとを記録する。そして、ROM9は、CPU7から読み出し要求が出力されると、ROM9に記録されているプログラムやデータから当該読み出し要求に応じたプログラム等をCPU7に出力する。
Further, the RAM 8 forms a work area for developing various programs executed by the
The ROM 9 records various programs and data executed by the
<携帯端末の動作>
次に、CPU7で実行される書き込み処理を、図3のフローチャートに従って説明する。この書き込み処理は、新生成ファイルデータを格納するディレクトリのファイルパス、及び新生成ファイルデータのファイル名の組み合わせとして、文字入力ユニット3から文字列の情報が入力されると実行される。そして、この演算処理が実行されると、まず、そのステップS101で、FATファイルシステムの規格に従い、前記入力された文字列の情報に基づいて、前記新生成ファイルデータのファイル項目、及びロングファイルネーム項目(ロングファイルネームが指定された場合)を生成する。そして、そのディレクトリ項目を、前記ディレクトリに対応するクラスタに記録させる指令をメモリーカードユニット4に出力する。
<Operation of mobile terminal>
Next, the writing process executed by the
次にステップS102に移行して、前記新生成ファイルデータが複数のクラスタに格納された場合、当該クラスタのクラスタ番号を、前記ロングファイルネーム項目と同じクラスタ内のファイルクラスタチェーン項目のクラスタチェーン情報フィールドに設定する。
具体的には、クラスタチェーン情報フィールドには、前記新生成ファイルの記録時にバッファに記録しておいたクラスタ番号をディレクトリ項目の先頭から記録する。また、クラスタチェーンの終端が明確となるように、クラスタチェーンの終端に対応するクラスタ番号を記録しているフィールドより後のクラスタチェーン情報フィールドには、「オールFF」を記録する。なお、その際、ファイルシステムのフォーマット種別(FAT12、FAT16、FAT32)に応じて、各フィールドの配置フォーマットを設定する。
Next, in step S102, when the newly generated file data is stored in a plurality of clusters, the cluster number of the cluster is assigned to the cluster chain information field of the file cluster chain item in the same cluster as the long file name item. Set to.
Specifically, in the cluster chain information field, the cluster number recorded in the buffer when the newly generated file is recorded is recorded from the head of the directory item. In addition, “all FF” is recorded in the cluster chain information field after the field in which the cluster number corresponding to the end of the cluster chain is recorded so that the end of the cluster chain becomes clear. At this time, the arrangement format of each field is set according to the format type (FAT12, FAT16, FAT32) of the file system.
次にステップS103に移行して、前記ロングファイルネーム項目と同じクラスタに格納されているファイルクラスタチェーン項目の予約フィールド、属性フィールド、及びチェックサムフィールドにフィールド値を設定する。具体的には、予約フィールドには、ロングファイルネーム項目と同じフィールド値を設定する。また、属性フィールドには、「0x0F&0x20」を設定する。そして、チェックサムフィールドには、「0x00」を設定する。 In step S103, field values are set in the reserved field, attribute field, and checksum field of the file cluster chain item stored in the same cluster as the long file name item. Specifically, the same field value as the long file name item is set in the reserved field. In the attribute field, “0x0F & 0x20” is set. Then, “0x00” is set in the checksum field.
次にステップS104に移行して、ファイルクラスタチェーン項目が引き続くか否かを判定する。具体的には、前記ファイルデータのクラスタチェーンが長く、1個のファイルクラスタチェーン項目では後続するクラスタ番号を記録しきれないか否かを判定する。そして、1個のファイルクラスタチェーン項目では記録しきれない場合には、ステップS105に移行し、記録できる場合には、ステップS106に移行する。 Next, the process proceeds to step S104, and it is determined whether or not the file cluster chain item continues. Specifically, it is determined whether or not the file data has a long cluster chain and the subsequent cluster number cannot be recorded in one file cluster chain item. If one file cluster chain item cannot be recorded, the process proceeds to step S105, and if it can be recorded, the process proceeds to step S106.
前記ステップS105では、前記ロングファイルネーム項目と同じクラスタ内のファイルクラスタチェーン項目のインデックスフィールドのフィールド値を設定し、また、新しいファイルクラスタチェーン項目を生成した後、前記ステップS102に移行する。なお、その際、前記同じクラスタ内のファイルクラスタチェーン項目がセクタ領域の先頭に記録されていた場合、つまり、新しいファイルクラスタチェーン項目を記録可能な空き領域がない場合には、次のセクタに生成する。また、当該次のセクタが、クラスタ領域の最終セクタである場合には、新しいクラスタ領域を確保して生成するクラスタアロケート処理を行う。 In step S105, the field value of the index field of the file cluster chain item in the same cluster as the long file name item is set, and after creating a new file cluster chain item, the process proceeds to step S102. At this time, if the file cluster chain item in the same cluster is recorded at the head of the sector area, that is, if there is no free area in which a new file cluster chain item can be recorded, it is generated in the next sector. To do. Further, when the next sector is the last sector of the cluster area, a cluster allocation process for securing and generating a new cluster area is performed.
なお、新しく生成したファイルクラスタチェーン項目を記録するタイミングとしては、例えば、生成のたびに記録するようにしてもよいし、最後に一括して記録するようにしてもよく、このファイルシステムが実装される製品の仕様に応じて設定すればよい。
一方、前記ステップS106では、前記ロングファイルネーム項目と同じクラスタ内のファイルクラスタチェーン項目のインデックスフィールドにフィールド値とビット6とを設定する。
Note that the newly generated file cluster chain item may be recorded, for example, every time it is generated, or may be recorded collectively at the end, and this file system is implemented. Set according to the product specifications.
On the other hand, in step S106, a field value and bit 6 are set in the index field of the file cluster chain item in the same cluster as the long file name item.
次にステップS107に移行して、前記ステップS102〜S106で設定されたフィールド値を、ファイルクラスタチェーン項目の各フィールドに記録させる指令(以下、「ディレクトリ項目記録指令」とも呼ぶ。)をメモリーカードユニット4に出力する。
次にステップS108に移行して、FATファイルシステムの規格に従い、通常のファイルシステム処理を実行してから、この演算処理を終了する。
Next, the process proceeds to step S107, and a command for recording the field value set in steps S102 to S106 in each field of the file cluster chain item (hereinafter also referred to as “directory item recording command”) is a memory card unit. 4 is output.
In step S108, normal file system processing is executed in accordance with the FAT file system standard, and the calculation processing is terminated.
次に、CPU7で実行される読み込み処理を、図4のフローチャートに従って説明する。この読み込み処理は、メモリーカードに記録されているファイルデータに、クラスタチェーンの解析が必要な処理を実行するために、処理対象となるファイルのファイルパスとして文字入力ユニット3から文字列の情報が入力されると実行される処理であって、まず、そのステップS201で、文字入力ユニット3から情報が入力された文字列に対応するファイル項目を読み出してCPU7に出力させる指令(以下、「ディレクトリ項目読出指令」とも呼ぶ。)をI/F6経由でメモリーカードユニット4に出力する。
Next, the reading process executed by the
次にステップS202に移行し、前記ロングファイルネーム項目と同じクラスタ内のファイルクラスタチェーン項目、或いは後述するステップS205で特定されたファイルクラスタチェーン項目の属性フィールドのフィールド値「0x2F」を確認する。
次にステップS203に移行して、前記ロングファイルネーム項目と同じクラスタ内のファイルクラスタチェーン項目、或いは後述するステップS205で特定されたクラスタチェーン項目の先頭のクラスタチェーン情報フィールドから順番にフィールド値を取得する。なお、その際、「オールFF」が記録されているフィールドの前までが有効なクラスタチェーン情報である。また、ファイルシステムのフォーマット種別に応じてファイルクラスタチェーン項目の各フィールドはフォーマットが異なるので、そのフォーマット種別を参照して、各クラスタチェーン情報フィールドからクラスタチェーン情報を取得する。
In step S202, the field value “0x2F” of the attribute field of the file cluster chain item in the same cluster as the long file name item or the file cluster chain item specified in step S205 described later is confirmed.
Next, the process proceeds to step S203, and field values are obtained in order from the file cluster chain item in the same cluster as the long file name item or from the first cluster chain information field of the cluster chain item specified in step S205 described later. To do. In this case, valid cluster chain information is before the field in which “all FF” is recorded. Further, since the fields of the file cluster chain item have different formats depending on the format type of the file system, the cluster chain information is acquired from each cluster chain information field with reference to the format type.
次にステップS204に移行して、ファイルクラスタチェーン項目が引き続くか否かを判定する。具体的には、前記ロングファイルネーム項目と同じクラスタに格納されているファイルクラスタチェーン項目のインデックスフィールドに、ファイルクラスタチェーン項目の終端を示すビット(ビット6)が記録されていないか否かを判定する。そして、ファイルクラスタチェーン項目の終端を示すビットが記録されていない場合には(Yes)ステップS205に移行し、記録されている場合には(No)ステップS206に移行する。 In step S204, it is determined whether the file cluster chain item continues. Specifically, it is determined whether or not the bit (bit 6) indicating the end of the file cluster chain item is recorded in the index field of the file cluster chain item stored in the same cluster as the long file name item. To do. If the bit indicating the end of the file cluster chain item is not recorded (Yes), the process proceeds to step S205. If the bit is recorded (No), the process proceeds to step S206.
前記ステップS205では、前記ロングファイルネーム項目と同じクラスタ内のファイルクラスタチェーン項目に引き続くファイルクラスタチェーン項目を特定してから、前記ステップS202に移行する。なお、その際、前記同じクラスタ内のファイルクラスタチェーン項目がセクタ領域の先頭に記録されていた場合には、次のセクタから特定する。また、当該セクタがクラスタ領域の最終セクタである場合には、次のクラスタから特定する。 In step S205, a file cluster chain item subsequent to the file cluster chain item in the same cluster as the long file name item is specified, and then the process proceeds to step S202. At this time, if the file cluster chain item in the same cluster is recorded at the head of the sector area, it is specified from the next sector. If the sector is the last sector of the cluster area, the sector is identified from the next cluster.
一方、前記ステップS206では、FATファイルシステムの規格に従い、通常のファイルシステム処理を実行し、その処理結果をI/F6経由で表示ユニットに出力してから、この演算処理を終了する。なお、その際、クラスタチェーンの情報が必要となった場合には、上記フローで取得したフィールド値を参照し、FATの走査処理は一切行わない。 On the other hand, in step S206, normal file system processing is executed in accordance with the FAT file system standard, the processing result is output to the display unit via the I / F 6, and the calculation processing is terminated. At this time, if cluster chain information is required, the field value acquired in the above flow is referred to and no FAT scanning process is performed.
<携帯端末の具体的動作>
次に、本実施形態の携帯端末1の動作を具体的状況に基づいて詳細に説明する。
<ファイルの生成>
まず、被写体の画像データが撮像ユニット2のCCDカメラで生成されたとする。すると、図1に示すように、撮像ユニット2によって、その生成された画像データがCPU7に出力され、CPU7によって、その画像データのファイルデータが生成される。
<Specific operation of mobile terminal>
Next, the operation of the
<File generation>
First, it is assumed that the image data of the subject is generated by the CCD camera of the
次いで、その生成されたファイルデータ(新生成ファイルデータ)を記録するディレクトリ(メモリーカード内のディレクトリ)のファイルパス、及び新生成ファイルデータのファイル名の組み合わせとして、利用者が文字入力ユニット3のキーボードから文字列を入力したとする。すると、CPU7によって、ファイル格納指令がI/F6経由でメモリーカードユニット4に出力される。そして、メモリーカードユニット4によって、前記生成された新生成ファイルデータが前記ディレクトリに格納される(前記新生成ファイルが複数のクラスタに格納されて、クラスタチェーンが生成される。)。
Next, the user uses the keyboard of the
また同時に、CPU7によって、書き込み処理が実行され、図3に示すように、まずそのステップS101で、FATファイルシステムの規格に従い、前記入力された文字列の情報に基づいて、前記新生成ファイルデータのファイル項目、及びロングファイルネーム項目(ロングファイルネームが指定された場合)が生成される。そして、メモリーカードユニット4によって、そのファイル項目、及びロングファイル項目が前記ディレクトリに対応するクラスタに記録される。
At the same time, a writing process is executed by the
また、ステップS102で、前記新生成ファイルデータが格納されたクラスタのクラスタ番号が、図5に示すように、前記ロングファイルネーム項目と同じクラスタに格納されているファイルクラスタチェーン項目のクラスタチェーン情報フィールドに設定される。さらに、ステップS103で、前記ファイルクラスタチェーン項目の予約フィールドに、ロングファイルネーム項目と同じフィールド値が設定され、属性フィールドに「0x0F&0x20」が設定され、チェックサムフィールドに「0x00」が設定される。そして、ステップS104の判定が「No」となり、ステップS106で、前記ファイルクラスタチェーン項目のインデックスフィールドにフィールド値とビット7とが設定される。
In step S102, the cluster number information field of the file cluster chain item in which the cluster number of the cluster storing the newly generated file data is stored in the same cluster as the long file name item as shown in FIG. Set to In step S103, the same field value as the long file name item is set in the reserved field of the file cluster chain item, “0x0F & 0x20” is set in the attribute field, and “0x00” is set in the checksum field. Then, the determination in step S104 is “No”, and in step S106, the field value and
なお、図5は、新生成ファイルデータを、クラスタ番号10→11→12→13→14→15→16→17→18→19というクラスタチェーンで記録したときの状態である。
そして、ステップS107で、ディレクトリ項目記録指令がI/F6経由でメモリーカードユニット4に出力され、メモリーカードユニット4によって、上記ステップS102〜S106で設定されたフィールド値が、前記ファイルクラスタチェーン項目の各フィールドに記録され、ステップS108で、通常のファイルシステム処理が実行される。
FIG. 5 shows a state when the newly generated file data is recorded in a cluster chain of
In step S107, a directory item recording command is output to the
<ファイルの処理>
また、上記フローが実行され、ファイルデータがメモリーカード内に記録された後に、メモリーカード内に記録されているファイルデータに、クラスタチェーンの解析が必要な処理を実行するために、処理対象となるファイルのファイルパスとして利用者が文字入力ユニット3から文字列の情報を入力したとする。すると、CPU7によって、読み込み処理が実行され、図4に示すように、まず、そのステップS201で、ディレクトリ項目読出指令がI/F6経由でメモリーカードユニット4に出力される。そして、メモリーカードユニット4によって、前記利用者によって指定されたファイルパス(ファイル)に対応するファイル項目がメモリーカードから読み出されてCPU7に出力される。
<File processing>
In addition, after the above flow is executed and the file data is recorded in the memory card, the file data recorded in the memory card is subject to processing in order to execute processing that requires cluster chain analysis. It is assumed that the user inputs character string information from the
また、ステップS202で、前記ロングファイルネーム項目と同じクラスタに格納されているファイルクラスタチェーン項目の属性フィールドのフィールド値が「0x2F」であることが確認され、ステップS203で、前記ファイルクラスタチェーン項目の先頭のクラスタチェーン情報フィールドから順番に有効なフィールド値が取得される。つまり、FATの走査なしに、ファイルデータのクラスタチェーンの情報が取得される。 In step S202, it is confirmed that the field value of the attribute field of the file cluster chain item stored in the same cluster as the long file name item is “0x2F”. In step S203, the file cluster chain item Effective field values are acquired in order from the first cluster chain information field. That is, the cluster chain information of the file data is acquired without FAT scanning.
ここで、前記ファイルクラスタチェーン項目のインデックスフィールドにビット7が記録されていたとする。すると、ステップS204の判定が「No」となり、ステップS206で、FATファイルシステムの規格に従い、通常のファイルシステム処理が実行され、その出力された処理結果がI/F6経由で表示ユニットに出力される。そして、表示ユニット5によって、その出力された処理結果の画像データが表示装置に表示される。
Here, it is assumed that
このように、本実施形態の携帯端末1にあっては、ファイルクラスタチェーン項目のクラスタチェーン情報フィールドに、ファイルデータのクラスタ番号を記録するようにした。そのため、ファイルデータが複数のクラスタにまたがって記録されているとき(クラスタチェーンが生成されているとき)に、クラスタチェーンの解析が必要な処理を行う場合には、ファイルクラスタチェーン項目のクラスタチェーン情報フィールドのフィールド値を解析することで、クラスタチェーン情報を取得することができる。そのため、例えば、FATを参照することでクラスタチェーン情報を取得する方法に比べ、クラスタチェーンに関するソフトウェア(ファームウェア)処理の高速化を図ることが可能である。
As described above, in the
また、ファイルクラスタチェーン項目以外のディレクトリ項目は、FATファイルシステムの規格に従って設定した。そのため、携帯端末1で生成されたファイルは、FATファイルシステムを搭載したパソコンでも適切に認識させることができ、それらのパソコンでファイルをそのまま扱わせることができる。即ち、従来のファイルシステムに大幅な改修や変更をせずに、従来のFATファイルシステムをベースとして実装を図ることができ、導入に必要なプロセスを最小限に留めることができる。さらに、従来のFATファイルシステム及びVFATファイルシステム上でも正常に認識され互換性を保持できる。
Further, directory items other than the file cluster chain item are set according to the FAT file system standard. Therefore, the file generated by the
以上、図3のステップS106が特許請求の範囲に記載の記録機能を構成し、以下同様に、図4のステップS201が情報取得機能を構成し、図1のメモリーカードユニット4、CPU7、図3のステップS106が記録手段を構成し、図1のメモリーカードユニット4、CPU7、図4のステップS201が情報取得手段を構成する。
なお、本発明のファイル管理プログラム及びファイル管理装置は、上記実施の形態の内容に限定されるものではなく、本発明の趣旨を逸脱しない範囲で適宜変更可能である。
As described above, step S106 in FIG. 3 constitutes the recording function described in the claims, and similarly, step S201 in FIG. 4 constitutes the information acquisition function, and the
Note that the file management program and the file management apparatus of the present invention are not limited to the contents of the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention.
1は携帯端末、2は撮像ユニット、3は文字入力ユニット、4はメモリーカードユニット、5は表示ユニット、6はI/F、7はCPU、8はRAM、9はROM、10はバス 1 is a portable terminal, 2 is an imaging unit, 3 is a character input unit, 4 is a memory card unit, 5 is a display unit, 6 is an I / F, 7 is a CPU, 8 is a RAM, 9 is a ROM, 10 is a bus
Claims (4)
前記ファイルデータを格納しているクラスタを示すクラスタチェーン情報を、当該クラスタチェーン情報を記録するためのファイルクラスタチェーン項目に記録する記録機能をコンピュータに実行させることを特徴とするファイル管理プログラム。 A file management program for recording each file data using a cluster chain based on the FAT file system,
A file management program for causing a computer to execute a recording function of recording cluster chain information indicating a cluster storing the file data in a file cluster chain item for recording the cluster chain information.
前記ディレクトリ項目を格納しているクラスタを示すクラスタチェーン情報を、当該クラスタチェーン情報を記録するためのファイルクラスタチェーン項目に記録する記録手段を備えたことを特徴とするファイル管理装置。 A file management device for recording each file data using a cluster chain based on the FAT file system,
A file management apparatus comprising: recording means for recording cluster chain information indicating a cluster storing the directory item in a file cluster chain item for recording the cluster chain information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005129521A JP2006309400A (en) | 2005-04-27 | 2005-04-27 | Program and device for managing file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005129521A JP2006309400A (en) | 2005-04-27 | 2005-04-27 | Program and device for managing file |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006309400A true JP2006309400A (en) | 2006-11-09 |
Family
ID=37476231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005129521A Withdrawn JP2006309400A (en) | 2005-04-27 | 2005-04-27 | Program and device for managing file |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006309400A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8176103B2 (en) | 2008-03-12 | 2012-05-08 | Samsung Electronics Co., Ltd. | File access method and system |
-
2005
- 2005-04-27 JP JP2005129521A patent/JP2006309400A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8176103B2 (en) | 2008-03-12 | 2012-05-08 | Samsung Electronics Co., Ltd. | File access method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7664783B2 (en) | File management program, data structure, and file management device | |
US8918579B2 (en) | Storage device and method for selective data compression | |
US7631022B2 (en) | Information processing apparatus and recording medium | |
US8996787B2 (en) | Storage device aware of I/O transaction and stored data | |
US9047176B2 (en) | Storage device and method for utilizing unused storage space | |
US10166467B2 (en) | Information processing device, data structure of game data, and recording medium | |
US20150126288A1 (en) | Information processing device, program, and recording medium | |
JP5217155B2 (en) | File compression automatic determination method and method, and program | |
TWI514278B (en) | Method for generating a reduced snapshot image for booting, computing apparatus readable recording medium, and computing apparatus | |
JP2011257972A (en) | Image processing apparatus, program, and image processing method | |
JP2006309400A (en) | Program and device for managing file | |
JP2006309536A (en) | Program and device for managing file | |
JP4897359B2 (en) | MEMORY MANAGEMENT DEVICE, MEMORY MANAGEMENT METHOD, AND PROGRAM | |
JP2009157441A (en) | Information processor, file rearrangement method, and program | |
KR101106568B1 (en) | File sorting System for mobile device and Method thereof | |
US20100274828A1 (en) | Electronic Device, Storage Area Allocation Method for File System, and Computer Product | |
JP2006092088A (en) | File management program, data structure, and file management device | |
JP7021401B1 (en) | Logging support device, logging system, logging support method and program | |
US20070150528A1 (en) | Memory device and information processing apparatus | |
JP2006127444A (en) | File management program, data structure and file management device | |
JP5047139B2 (en) | Image processing apparatus and program | |
JP2009217588A (en) | Filing system, electronic camera, file access method, and program | |
JP5488104B2 (en) | Electronic device and program | |
TWI386809B (en) | Apparatus and method for integrating memories | |
JP2006092248A (en) | File management program, data structure, and file management device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080423 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20090612 |