File management apparatus and method, program therefore, and recording medium

The present invention provides a file management apparatus for managing files, recorded on a recording medium, on the basis of an index file including management information about the files, the apparatus including: a management status information holding unit for holding management status information indicative of a management status of the files in the index file; a recording status detecting unit for detecting a recording status of the files recorded on the recording medium; and an inconsistency detecting unit for detecting an inconsistency between the management status of the files in the index file and the recording status of the files recorded on the recording medium on the basis of the management status information and the recording status detected by the recording status detecting unit.

CROSS REFERENCES TO RELATED APPLICATIONS

The present invention contains subject matter related to Japanese Patent Application JP 2005-052145 filed in the Japanese Patent Office on Feb. 25, 2005, the entire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to file management apparatuses and, in particular, to file management apparatuses each managing files, which are recorded on a recording medium, on the basis of an index file, and more particularly, relates to a file management apparatus and method for determining whether an inconsistency exists between a management status of files included in an index file and a recording status of files recorded on a recording medium, a program that allows a computer to execute the method, and a recording medium on which management status information used to determine whether the inconsistency exists is recorded.

2. Description of the Related Art

Recently, digital versatile discs (DVDs) have come along. In addition, flash memories are increasing in capacity. The use of those large-capacity recording media allow relatively small imaging devices, such as digital camcorders, digital still cameras, and mobile cellular phones, to record captured images as a large number of content files.

As the number of content files recorded on a recording medium increases, it is more difficult for a user to retrieve a desired content file. Japanese Unexamined Patent Application Publication No. 2004-227630 discloses a method for creating an index file to compile attribute information related to content files as management information (index information) about the respective content files and managing the content files recorded on a recording medium using the index file. A user can manage the content files in a virtual folder structure using the index file. The usability of large number of files can be improved.

SUMMARY OF THE INVENTION

In managing the files on the basis of the above-mentioned index file, it is necessary to generate management information every file to be managed and update the contents of the index file in response to the addition, deletion, or editing of a file to be managed. Generally, the index file is updated through application software to manage the index file. Under general conditions, therefore, each management information unit included in the index file corresponds to any of the managed content files. The management status of the files in the index file is consistent with a recording status of the files recorded on the recording medium at every time.

However, if the user directly deletes, adds, or edits a content file in a file system through a personal computer (PC) without using the application software, the index file may not reflect the operation. In other words, the index file may include management information about the deleted content file. On the other hand, when management information about the added content file is not added to the index file, alternatively, when the index file does not reflect the changed file name, management information units included in the index file do not correspond to the respective content files actually recorded on the recording medium in a one-to-one relationship. Disadvantageously, the contents of the index file, i.e., the management status of the content files in the index file may be inconsistent with the recording status of the content files recorded on the recording medium.

To determine whether an inconsistency exists between the management status and the recording status, it is necessary to check the files recorded on the recording medium against the management information about the files contained in the index file. Unfortunately, it takes much time to check the files against the management information.

It is desirable to provide a file management apparatus and method capable of determining whether an inconsistency exists between the contents of an index file and a recording status of files recorded on a recording medium at high speed, a program allowing a computer to execute the method, and a recording medium on which management status information to determine whether the inconsistency exists is recorded.

The present invention is made to solve the above-mentioned disadvantages. According to an embodiment of the present invention, there is provided a file management apparatus for managing files, recorded on a recording medium, on the basis of an index file including management information about the files, the apparatus including: a management status information holding unit for holding management status information indicative of a management status of the files in the index file; a recording status detecting unit for detecting a recording status of the files recorded on the recording medium; and an inconsistency detecting unit for detecting an inconsistency between the management status of the files in the index file and the recording status of the files recorded on the recording medium on the basis of the management status information and the recording status detected by the recording status detecting unit. Advantageously, when it is determined whether an inconsistency exists between the management status of the files in the index file (i.e., the contents of the index file) and the recording status of the files recorded on the recording medium, the inconsistency can be detected on the basis of the management status information at high speed without checking a management information unit about each file included in the index file against the corresponding file.

According to this embodiment, the management status information holding unit may hold the management status information about the files every directory, the files being recorded in a directory structure on the recording medium. Accordingly, whether the inconsistency exists can be determined every directory on the basis of the management status information.

In this instance, the management status information may include information regarding the number of files included in each directory. Therefore, when an inconsistency between the contents of the index file and the actual recording status of the files occurs by adding or deleting a file, the inconsistency can be detected at high speed.

In addition, the management status information may include information regarding the modification times of the files included in each directory. Accordingly, when an inconsistency between the contents of the index file and the actual recording status of the files occurs by adding, deleting, overwriting, or editing a file, the inconsistency can be detected at high speed.

In this instance, the information regarding the modification times of the files may be a checksum for each directory. The checksum is generated on the basis of the modification times of the files included in each directory. Consequently, the inconsistency can be detected at high speed.

Further, the management status information may include information regarding the names of the files included in each directory. Advantageously, when an inconsistency between the contents of the index file and the actual recording status of the files occurs by adding or deleting a file or changing the name of a file, the inconsistency can be detected at high speed.

In this instance, the information regarding the file names may be a checksum for each directory. The checksum is generated on the basis of the names of the files included in each directory. Consequently, the inconsistency can be detected at high speed.

In addition, the management status information may include information regarding the creation time of the most recently created file in each directory. Accordingly, when an inconsistency between the contents of the index file and the actual recording status of the files occurs by adding a file, the inconsistency can be detected at high speed.

Further, the management status information may include information regarding the modification time of the last modified file in each directory. Advantageously, even when an inconsistency between the contents of the index file and the actual recording status of the files occurs by editing any of the files, the inconsistency can be detected at high speed.

According to this embodiment of the present invention, the file management apparatus may further include a management status information generating unit for generating the management status information from the management information. Accordingly, the management status information can be updated in agreement with the modified management information included in the index file, the modification being caused by adding or deleting a file or changing the name of a file.

In this instance, the management status information generating unit may generate the management status information about the files every directory, the files being recorded in a directory structure on the recording medium. Consequently, whether the inconsistency exists can be determined every directory on the basis of the management status information.

Further, the management information may be generated from the files recorded on the recording medium. In this instance, the management status information may be generated from the management information. The management status information may be generated from the management information included in the index file.

According to another embodiment of the present invention, there is provided a file management apparatus for managing files, recorded on a recording medium, on the basis of an index file including management information about the files, the apparatus including: a management status information holding unit for holding at least two kinds of management status information units indicating a management status of the files in the index file; a recording status detecting unit for detecting at least two kinds of recording statuses of the files recorded on the recording medium so that the recording statuses correspond to the at least two kinds of management status information units, respectively; and an inconsistency detecting unit for detecting an inconsistency between the management information included in the index file and the recording status of the files recorded on the recording medium on the basis of each management status information unit and the corresponding recording status detected by the recording status detecting unit. Accordingly, when it is determined whether an inconsistency exists between the contents of the index file and the recording status of the files recorded on the recording medium, the inconsistency can be detected on the basis of the management status information at high speed without checking a management information unit about each file included in the index file against the corresponding file. In this instance, whether the inconsistency exists is determined on the basis of at least two kinds of management status information units. Advantageously, the precision of the determination can be increased.

According to this embodiment of the present invention, the management status information about the files, recorded in a directory structure on the recording medium, may be held every directory. Thus, whether the inconsistency exists can be determined every directory on the basis of the management status information.

Further, the management status information may include at least two of information regarding the number of files managed in the index file, information regarding the names of the files, and information regarding the modification times of the respective files. Consequently, when the number of files is changed by adding or deleting a file, when the number of files is not changed by adding a file and deleting any of the files, alternatively, when an inconsistency between the contents of the index file and the actual recording status of the files occurs by overwriting any of the files, changing the name of any file, or editing any file, the inconsistency can be detected with high precision at high speed.

According to another embodiment of the present invention, there is provided a file management method for managing files, recorded on a recording medium, on the basis of an index file including management information about the files, the method including the steps of; previously holding management status information indicative of a management status of the files in the index file; detecting a recording status of the files recorded on the recording medium; and detecting an inconsistency between the management status of the files in the index file and the recording status of the files recorded on the recording medium on the basis of the management status information and the detected recording status. Accordingly, when it is determined whether an inconsistency exists between the contents of the index file and the recording status of the files recorded on the recording medium, the previously held management status information may be referred to without checking a management information unit about each file included in the index file against the corresponding file. Advantageously, the inconsistency can be detected at high speed.

According to another embodiment of the present invention, there is provided a program for managing files, recorded on a recording medium, on the basis of an index file including management information about the files, the program allowing a computer to execute a process including the steps of: previously holding management status information indicative of a management status of the files in the index file; detecting a recording status of the files recorded on the recording medium; and detecting an inconsistency between the management status of the files in the index file and the recording status of the files recorded on the recording medium on the basis of the management status information and the detected recording status. Accordingly, when it is determined whether an inconsistency exists between the contents of the index file and the recording status of the files recorded on the recording medium, the previously held management status information may be referred to without checking a management information unit about each file included in the index file against the corresponding file. Advantageously, the inconsistency can be detected at high speed.

According to further another embodiment of the present invention, there is provided a recording medium storing an index file including management information about files recorded thereon, wherein management status information about the files is recorded on the recording medium, the management status information being used to determine whether a management status of the files in the index file is inconsistent with a recording status of the files recorded on the recording medium. Accordingly, when it is determined whether an inconsistency exists between the contents of the index file and the recording status of the files recorded on the recording medium, the previously held management status information may be referred to without checking a management information unit about each file included in the index file against the corresponding file. Thus, the inconsistency can be detected at high speed.

Advantageously, according to the present invention, whether an inconsistency exists between the contents of the index file and the recording status of the files can be determined at high speed.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1is a diagram of the entire structure of a video recording apparatus100to which a file management apparatus according to an embodiment of the present invention is applied. The video recording apparatus100captures still images and moving images and records the captured images as content files on a recording medium200. According to the present embodiment, the file management apparatus manages content files recorded on the recording medium200on the basis of an index file, which will be described below. The file management apparatus will also be described below.

The video recording apparatus100includes a lens unit110, motors113and114for operating the lens unit110, and a motor driver115. The video recording apparatus100further includes an imager121, an analog processor122, an analog-to-digital (A/D) converter123, a digital processor124, a timing generator125for generating timing signals for the above components, and a camera control unit126. In addition, the video recording apparatus100includes a video encoder131, an audio encoder132, a file generator133, a file decoder134, a video decoder135, an audio decoder136, a memory137, a memory controller138, and a system control unit139. The system control unit139is connected with a signal line extending from a display operation unit150. The video recording apparatus100further includes an error corrector141, a data modulator/demodulator (modem)142, a magnetic field modulation driver143, a magnetic field head144, a servo circuit145, a motor146, an optical pickup147, and a drive control unit148. A recording medium to store video images, e.g., the recording medium200is mounted on the video recording apparatus100.

The lens unit110receives light from an object and includes a zoom lens111and a focus lens112. The zoom lens111and the focus lens112are connected to the motors113and114, respectively, in a manner such that the zoom lens111is movable by driving the motor113and the focus lens112is movable by driving the motor114. The motors113and114are connected to the motor driver115which controls the motors113and114.

The imager121converts light received through the lens unit110into electrostatic energy to store the energy. For instance, a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) sensor can be used as the imager121. The analog processor122eliminates noise from analog signals of the imager121by correlated double sampling (CDS) and compensates analog signal level changes by automatic gain control (AGC). The A/D converter123converts analog signals supplied from the analog processor122into digital signals. The digital processor124performs processing, such as white balance processing and gamma correction processing.

Output signals of the digital processor124are supplied as video signals to the video encoder131. Information detected by the digital processor124is transmitted to the camera control unit126. The camera control unit126controls the motor driver115and the timing generator125on the basis of the information detected by the digital processor124. The timing generator125generates timing signals to be supplied to the imager121, the analog processor122, the A/D converter123, and the digital processor124.

The video encoder131encodes video signals. The audio encoder132encodes audio signals. The file generator133combines encoded video data with encoded audio data to generate a content file (multiplexed data). The file decoder134decodes a content file to output video data and audio data. The video decoder135decodes video data to output video signals. The audio decoder136decodes audio data to output audio signals.

InFIG. 1, an input signal supplied to the audio encoder132and output signals of the video decoder135and the audio decoder136are not shown. An audio input signal is supplied to the audio encoder132. The video decoder135outputs a video output signal and the audio decoder136outputs an audio output signal.

The memory137stores a program which runs on the video recording apparatus100. The memory137serves as a main memory for the system control unit139, which will be described below. The memory controller138writes multiplexed data supplied from the file generator133or the error corrector141into the memory137. In addition, the memory controller138reads multiplexed data from the memory137and supplies the data to the error corrector141or the file decoder134.

The system control unit139controls the whole operation of the video recording apparatus100and includes, e.g., a processor. The system control unit139controls the respective operations of the memory controller138, the file generator133, and the file decoder134. The system control unit139is connected to the drive control unit148to operate a disk drive through the drive control unit148. In addition, the system control unit139is connected to the camera control unit126to obtain information about the status of the zoom lens111and focus lens112, e.g., information indicating whether the autofocus function is activated, or information regarding the focal length.

The system control unit139is further connected to the display operation unit150. The display operation unit150is used to display an image captured by the video recording apparatus100or to grasp an instruction input by a user. The display operation unit150includes various keys, e.g., a shutter key, a zoom control key, and a mode selection key. The shutter key and the zoom control key are used to capture an image with the video recording apparatus100. The mode selection key is used to switch the video recording apparatus100between an image capture mode and a play mode for content file playback. In addition, the display operation unit150displays thumbnail images included in an index file, which will be described below, to receive a user's selection, so that a content file corresponding to the selected thumbnail image can be played back. The display operation unit150may include, e.g., a liquid crystal display panel and a touch panel.

When the user instructs to record captured images through the display operation unit150, the system control unit139detects a free space in the recording medium200according to a file system of the recording medium200and records sequentially captured images as a content file210into the free space. In this instance, information necessary to generate an index file220is obtained from the content file210. Simultaneously, the contents of the index file220held in the memory is updated.

The error corrector141adds a code for interleave or error correction to multiplexed data supplied from the memory controller138and inputs the resultant data to the data modem142. The error corrector141performs deinterleaving and error correction processing to decoded signals supplied from the data modem142and then supplies the resultant multiplexed data to the memory controller138.

The data modem142performs predetermined modulation processing to data so that the data can be recorded on the recording medium200and outputs the resultant data to the magnetic field modulation driver143. Simultaneously, the data modem142outputs a signal to drive the optical pickup147. In addition, the data modem142performs predetermined demodulation processing to signals from the optical pickup147and outputs the demodulated signals to the error corrector141.

Upon recording, the magnetic field modulation driver143drives the magnetic field head144in response to an input signal to apply a magnetic field to the recording medium200. The optical pickup147applies a laser beam for recording to the recording medium200to record signals on the recording medium200. Upon playback, the optical pickup147applies a laser beam for playback to the recording medium200and converts light reflected from the recording medium200into electric signals to obtain playback signals. As for the above operations, in response to a request from the system control unit139, the drive control unit148generates the request to the servo circuit145to control the entire disk drive. The servo circuit145controls a disk radial moving servo operation, a tracking servo operation, and a focus servo operation for the optical pickup147and also controls a spindle servo operation for the motor146.

In the above-mentioned structure, it is assumed that the recording medium200is a magneto-optical disk to which magnetic field modulation is performed. When a phase change disk is used, the fundamental structure of the video recording apparatus is the same as the above. The recording media200are not limited to an optical disk and a magneto-optical disk. A semiconductor memory, such as a flash memory, may be used. The video recording apparatus100may include components appropriate to the type of recording medium200.

FIG. 2shows essential functional components of a file management apparatus160according to the present embodiment of the present invention. The file management apparatus160manages the content files210recorded on the recording medium200on the basis of the index file220including management information about the content files210. According to the present embodiment, the file management apparatus160can detect an inconsistency between the contents of the index file220and a recording status of the content files210recorded on the recording medium200.

In this instance, management information to manage the content files210to be managed is allocated to the index file220. As will be described below, the management information includes file property information, e.g., information regarding each file name, that regarding the creation time of each file, and that regarding the modification time of each file. An inconsistency between the contents of the index file220and the recording status of the content files210recorded on the recording medium200means that a management status of the content files210in the content file210is inconsistent with the recording status of the content files210recorded on the recording medium200. For instance, when any of the content files210corresponding to the management information units included in the content file210is not recorded on the recording medium200, when any of the management information units corresponding to the content files210recorded on the recording medium200is not included in the index file220, alternatively, when the contents of each content file210recorded on the recording medium200are not consistent with the descriptions of the corresponding management information unit, the inconsistency exists between the management status and the recording status.

When the user adds a new content file210or deletes or edits any of the content files210through the video recording apparatus100according to the present embodiment, the contents of the index file220are updated in response to the user operation. A management information unit corresponding to the content file210is added to the index file220, alternatively, the corresponding management information unit is deleted from or edited in the index file220. Thus, the above-described inconsistency does not occur. However, when the user directly adds a new content file210or deletes or edits any of the content files210in the file system through a PC, the contents of the index file220are not updated. The inconsistency may occur. According to the present embodiment, the file management apparatus160can detect the inconsistency at high speed.

Referring toFIG. 2, the file management apparatus160includes a file operation unit161, an inconsistency detection information generating unit162, an inconsistency detection information holding unit230, a recording status detecting unit163, and an inconsistency detecting unit164.

The file operation unit161receives various operation instructions for the file management apparatus160. Through the file operation unit161, the file management apparatus160can receive a signal to instruct the start of a process of generating inconsistency detection information, detecting the recording status of the content files210on the recording medium200, and determining whether an inconsistency exists between the contents of the index file220and the actual recording status of the content files210recorded on the recording medium200. The process including the above-mentioned series of steps will be referred to as an inconsistency detecting process, which will be described below.

The inconsistency detecting process may be started in response to a user's operation input to instruct the start of the inconsistency detecting process, the input being supplied through the display operation unit150. Alternatively, the process may be automatically started at predetermined time. As for the time to execute the inconsistency detecting process, e.g., when the video recording apparatus100is powered on, alternatively, when the number of files is equal to or larger than a predetermined value, the process can be automatically started. In the case where the inconsistency detecting process is started in response to a user instruction, when the user wants to execute the process, whether an inconsistency exists between the contents of the index file220and the recording status of the content files210on the recording medium200can be determined. In the case where the inconsistency detecting process is simultaneously executed when the video recording apparatus100is turned on, whether an inconsistency exists therebetween can be determined without any user operation. In this instance, the larger the number of files becomes, the more easily the inconsistency occurs between the contents of the index file220and the recording status of the content files210recorded on the recording medium200. Therefore, in the case where the inconsistency detecting process is executed at the time when the number of files is equal to or larger than a predetermined value, whether an inconsistency exists between the contents of the index file220and the recording status of the files210recorded on the recording medium200can be determined under circumstances where the inconsistency easily occurs.

The inconsistency detection information generating unit162generates inconsistency detection information (management status information). The inconsistency detection information indicates the management status of the content files210in the index file220. The inconsistency detection information is generated when the index file220is generated. Each time the contents of the index file220are updated, the descriptions of the inconsistency detection information are also updated. The inconsistency detection information may be generated on the basis of the management information included in the index file220. Alternatively, the inconsistency detection information may be generated on the basis of the management information which is extracted from the content files210in order to generate the index file220. Alternatively, when the index file220is generated or updated, information necessary to generate the inconsistency detection information is directly extracted from the content files210to generate the inconsistency detection information. The inconsistency detection information generating unit162can generate a plurality of kinds of inconsistency detection information units based on items which the inconsistency may occur with respect to. Those kinds of inconsistency detection information units may include information regarding the number of files, information regarding the modification times of the files, information regarding the names of the files, and information regarding the creation times of the files.

When the content files210are recorded in a directory structure on the recording medium200, the inconsistency detection information generating unit162generates the inconsistency detection information every directory.

The inconsistency detection information holding unit230holds the inconsistency detection information generated by the inconsistency detection information generating unit162. The inconsistency detection information holding unit230can be provided for the recording medium200. For example, the header of the index file220functions as the inconsistency detection information holding unit230such that the inconsistency detection information can be held in the header of the index file220. The index file220will be described below.

The recording status detecting unit163detects the recording status of the content files210recorded on the recording medium200. The recording status detecting unit163detects the recording status of the content files210such that the recording status corresponds to the kind of inconsistency detection information. For instance, when the inconsistency detection information is concerned with the number of files, the recording status detecting unit163detects the number of content files210recorded on the recording medium200. When the inconsistency detection information is concerned with the modification times of the content files210, the recording status detecting unit163detects the modification times of the content files210recorded on the recording medium200. When the inconsistency detection information is about the names of the files, the recording status detecting unit163detects the names of the content files210recorded on the recording medium200. When the inconsistency detection information is about the creation times of the files, the recording status detecting unit163detects the creation times of the content files210recorded on the recording medium200.

In the case where the content files210are recorded in the directory structure on the recording medium200, the recording status detecting unit163detects the recording status of the content files210belonging to each directory, i.e., every directory.

The inconsistency detecting unit164determines, on the basis of the inconsistency detection information held by the inconsistency detection information holding unit230and the recording status of the content files210on the recording medium200detected by the recording status detecting unit163, whether an inconsistency exists between the contents of the index file220and the recording status of the content files210recorded on the recording medium200.

The file operation unit161, the inconsistency detection information generating unit162, the recording status detecting unit163, and the inconsistency detecting unit164can be realized as programs running on the system control unit139in the video recording apparatus100. The file operation unit161can be realized as a program which runs on the system control unit139in response to an operation input supplied through the display operation unit150. Each of the index file220and the content files210can be realized as a file recorded on the recording medium200. The inconsistency detection information holding unit230can be provided at the header of the index file220.

The video recording apparatus100according to the present embodiment will now be described in terms of software.FIG. 3shows the configuration of software170of the video recording apparatus100according to the present embodiment. It can be assumed that the hierarchy of the software170in the video recording apparatus100includes a user interface layer171, an application layer172, a first middleware layer173, a second middleware layer174, a hardware driver layer175, and a file system API (application program interface) layer176.

The user interface layer171transfers information between the user and the application layer172.

The application layer172is related to application software designed for various operations concerning image capture by the video recording apparatus100, display of captured images, and file management by the file management apparatus160.

The first and second middleware layers173and174are related to software that runs on the operating system (OS) and provides more specific and higher functions than those of the application software and OS.

The hardware driver layer175is related to software for operating hardware, i.e., the video recording apparatus100.

The file system API layer176includes a set of rules to define procedures of programs for the use of software to manage files (data) recorded on a recording medium. The content files210recorded on the recording medium200and the index file220are accessed through the file system API layer176.

In the above-mentioned software configuration, assuming that the content files210can be accessed in the second middleware layer174, the second middleware layer174can provide the respective functions of the inconsistency detection information generating unit162, the recording status detecting unit163, and the inconsistency detecting unit164inFIG. 2. In other words, in the second middleware layer174, the inconsistency detection information can be generated, the recording status of the content files210recorded on the recording medium200can be detected, and whether the contents of the index file220are inconsistent with the recording status of the content files210can be determined on the basis of the inconsistency detection information and the recording status of the content files210on the recording medium200.

On the other hand, assuming that the content files210cannot be accessed in the second middleware layer174, the application layer172has to provide the respective functions of the inconsistency detection information generating unit162, the recording status detecting unit163, and the inconsistency detecting unit164.

A method for managing the content files210through the file management apparatus160will now be described with reference toFIG. 4. According to the present embodiment, the file management apparatus160manages the content files210on the basis of the index file220. The file management apparatus160according to the present embodiment can manage the content files210according to the directory structure on the file system in the recording medium200as shown in part B ofFIG. 4. Alternatively, a virtual folder structure is established as shown in part A ofFIG. 4and the file management apparatus160may manage the content files210in the virtual folder structure independent of the directory structure shown in part B.

The index file220is recorded on the recording medium200. The index file220and the content files210are managed in accordance with the predetermined file system. In other words, the file system manages information necessary to read the index file220, e.g., information regarding the address of the recording position of the index file220, that regarding the file name thereof, and that regarding the length thereof. As necessary, the system control unit139of the video recording apparatus100reads the index file220to obtain the index file220and allows the memory controller138to record the obtained file in the internal memory137, thus holding the index file220in the memory137. According to the present embodiment, therefore, the usability of the content files210recorded on the recording medium200can be improved using the index file220.

The virtual folder structure based on the index file220in part A ofFIG. 4will now be described. In the file management apparatus160according to the present embodiment, it is assumed that the content files210are managed according to the virtual folder structure.

In the virtual folder structure in part A ofFIG. 4, a plurality of folder entries FDE and a plurality of file entries FLE are hierarchically organized.

Each folder entry FDE is a virtual folder arranged in the index file220. A folder entry can be provided according to user settings, e.g., every date, location, or type of captured image (i.e., landscape, portrait, animal, or building structure). The use of the folder entries can organize file entries or other folder entries. Consequently, the virtual folder structure can be constructed in the index file220.

On the other hand, each file entry FLE corresponds to any of the content files210(i.e., any of files File1to File5) on the file system shown in part B ofFIG. 4. In the index file220, when a content file210recorded on the recording medium200is entered as a file to be managed, an entry number to identify the entered content file210is assigned to the content file210. In the index file220, each content file210is handled as a file entry, serving as a file entered in the index file220. Referring to part A ofFIG. 4, the file entries FLE correspond to files entered in the index file220. When a folder is set in the index file220, an entry number is assigned to the folder. Each folder is managed as a folder entry in the index file220. As mentioned above, the user can set a desired virtual folder in the index file220such that a desired content file210belongs to the virtual folder in the index file220.

In the virtual folder structure in part A ofFIG. 4, four folder entries FDE-A, FDE-B, FDE-C, and FDE-D are set. The parent folder entry FDE-A contains the two folder entries FDE-B and FDE-C in the lower level. The folder entry FDE-B contains two file entries FLE-1and FLE-2. The folder entry FDE-C contains the folder entry FDE-D and a file entry FLE-3. The folder entry FDE-D contains two file entries FLE-4and FLE-5.

Part B ofFIG. 4shows a real recording status of the content files210recorded on the recording medium200. The content files210are managed according to the predetermined file system. The content files210are recorded on the recording medium200according to a predetermined directory structure. Referring to part B ofFIG. 4, a root directory DirA contains two directories DirB and DirC. The directory DirB contains three files File1to File3. The other directory DirC contains two files File4and File5.

As mentioned above, those files, serving as the content files210, are managed as file entries FLE in the index file220. For example, the file entries FLE-1and FLE-2in the folder structure in part A ofFIG. 4correspond to the files File2and File5in the file system, respectively. The files File2and File5belong to the virtual folder entry FDE-B in the index file220. The file entry FLE-3corresponds to the file File1in the file system. The file entries FLE-4and FLE-5correspond to the files File3and File4in the file system, respectively.

The above-mentioned virtual folder structure is created on application software. For instance, in the case where a directory structure is determined on the file system according to, e.g., a file operation rule, the user can create desired folders to classify and manage the content files210without manipulating the files in the file system.

As the file operation rule, e.g., the Design rule for Camera File system (DCF) can be used. The DCF is defined as a method for storing a file created through a digital camera. According to the DCF, image files can be shared between DCF-compatible devices. According to the DCF, the content files210are recorded on the recording medium200in a directory structure shown inFIG. 5. In the standard DCF directory structure, a DCF image root directory named “DCIM” is provided just below a root directory named “ROOT”.

The DCF image root directory holds DCF directories to store still image data files. The directory name of each DCF directory includes eight characters. The first to third characters indicate a three-digit directory number from 100 to 999. The subsequent five characters are called a free string written using only one-byte uppercase alphanumeric characters. Directory numbers have to be assigned to respective directories so as not to overlap each other. Skipping a number is permitted.

Each DCF directory contains still image data files. Each file name includes eight characters. The first to fourth characters indicate a free string written using only one-byte uppercase alphanumeric characters. The subsequent four characters indicate a four-digit file number from 0001 to 9999. File numbers have to be assigned to respective files so as not to overlap each other. Skipping a number is permitted. In the case of the JPEG compression format for still image data, a file name extension is expressed as “.JPG”. As mentioned above, according to the DCF, each content file210, serving as a still image file, belongs to any of the directories.

The structure of the index file220will now be described. The structure of the index file220depends on the type of file to be managed. It is desirable that the structure of the index file220be the same as that of a file format for a file to be managed.

Before describing the structure of the index file220, the structure of the content file210to be managed will now be explained with reference toFIG. 6. According to the present embodiment, the use of the QuickTime file format as a file format of the content file210will be described as an example. In the following description, a file recorded in the QuickTime file format will be called a QT movie file.

FIG. 6shows the structure of the content file210recorded in the QuickTime file format. The QuickTime file format is used to handle multimedia data. A basic data unit of a QuickTime file is called an atom. Actual data, such as video data and audio data, is held in a data unit, called a movie data atom (type name: “mdat”)400. Information necessary to play back the movie data atom400is held in a data unit, called a movie atom (type name: “moov”)300.

The movie atom300contains information necessary to play back the corresponding movie data atom400in a hierarchical structure, i.e., a movie header atom310, a movie clipping atom320, a user data atom330, and one or more track atoms340.

The movie header atom310contains information regarding the entire corresponding QT movie file, e.g., the duration, time scale, and creation time of the corresponding movie. The movie clipping atom320specifies a clipping region. The user data atom330includes arbitrary information defined by the user. The track atoms340contain various types of data, such as sound, video, and text, in different tracks.

Each track atom340includes a track header atom341that contains information regarding an entire track (e.g., the number of pixels in video, sound volume, and creation time), a track clipping atom342that specifies a clipping region of the track, a track matte atom343, an edit atom344, and a media atom345. In other words, the track atom340contains various data elements regarding the movie data atom400.

For example, the media atom345includes information regarding actual data that is actually used in the track. In other words, the media atom345contains information regarding the entire of a media (i.e., a data structure that contains information that describes the data for a track in a movie in the QuickTime file format), information regarding media data handling, and information regarding the structure of the media. Actual data is divided into minimum units called samples. A collection of arbitrary number of samples is called a chunk. The media atom345contains information regarding the size of each sample, information regarding a first chunk field, and information regarding the duration of each sample.

Actual data, such as video data or audio data, stored in the movie data atom400may be linear data that is not subjected to compression coding or may be data subjected to compression coding according to a predetermined compression coding method. As for video data (image data), image data coded by a compression coding method according to a standard, such as MPEG-2 Video, Motion JPEG, Motion JPEG 2000, MPEG-4, or AVC (Advanced Video Coding: MPEG-4 Part 10), can be stored. As for audio data, audio data coded by a compression coding method according to a standard, such as MPEG-1 Audio Layer 2, Dolby AC-3 (Audio Code Number 3), or ATRAC (Advanced TRansform Acoustic Coding), can be stored. Video data and audio data coding methods are not particularly limited.

In addition, text data and actual data of an MIDI (Musical Instrument Digital Interface) file can be allocated to the movie data atom400. In this case, text tracks and MIDI tracks are provided in the movie atom300on the basis of the structure of the movie data atom400.

FIG. 7shows the structure of the index file220designed for the above-mentioned QT movie file. As shown inFIG. 7, the index file220includes an index atom500corresponding to the movie atom300of the QT movie file and an index data atom600corresponding to the movie data atom400.

Information units to manage actual data allocated to the index data atom600are allocated as chunks to the index atom500. On the other hand, management information units associated with the content files210, serving as managed objects, recorded on the recording medium200are allocated to the index data atom600. Each management information unit indicates the attributes of the corresponding content file210and the descriptions thereof. In the index file220, the management information is used to manage the content files210. The management information may include several kinds of data items, e.g., a property, a text, a thumbnail picture, and an intro.

The index data atom600handles the content files210, entered as managed files, as entries. In the case where the content files210corresponding to entries610and620are QT movie files, a property700, a text611, a thumbnail picture612, and an intro613are allocated as chunks to each of the entries610and620. The property700is an essential item of the index data atom600. The text611, the thumbnail picture612, or the intro613is not provided depending on the type of content file210to be managed. For instance, when the content file210is a still image file including no audio information, the corresponding entry does not include the intro613.

The property700serves as data indicative of the attributes of the corresponding content file210to be managed. Management information, serving as binary data, set in the content file210is allocated together with information to manage the entry to the property700.

The text611comprises data indicative of a character string representing the title of the corresponding content file210.

The thumbnail picture612comprises a still image indicative of the contents of the corresponding content file210. For example, when the content file210includes moving image data, a first image can be allocated to the thumbnail picture612. Alternatively, the user may select an image to be allocated to the thumbnail picture612.

The intro613is audio data indicative of the contents of the corresponding content file210to be managed. For instance, audio data corresponding to several seconds (e.g., five seconds) after the start of playback of the corresponding content file210can be allocated to the intro613. Alternatively, the user may select audio data to be allocated to the intro613.

The index atom500will now be described. The index atom500includes a movie header atom510, a property track atom520corresponding to the properties700in the index data atom600, a text track atom530corresponding to the texts611, a thumbnail track atom540corresponding to the thumbnail pictures612, and an intro track atom550corresponding to the intros613.

As in the case of the QT movie file, information regarding the entire index file220is allocated to the movie header atom510to control the property track atom520, the text track atom530, the thumbnail track atom540, and the intro track atom550. Positional information units associated with respective actual data blocks are allocated to each of the property track atom520, the text track atom530, the thumbnail track atom540, and the intro track atom550in the order of entering the content files210in table form.

Referring toFIG. 8, in the index data atom600, actual data blocks of respective management information units associated with the content files210are allocated to the respective entries. For example, a property P, a text T, a thumbnail picture are allocated as actual data blocks of the management information unit to an entry numbered 2 (entry #2). In the index atom500, positional information units of the respective actual data blocks, i.e., the properties700, the texts611, the thumbnail pictures612, and the intros613, are allocated to the property track atom520, the text track atom530, the thumbnail track atom540, and the intro track atom550, respectively. The properties700, the texts611, the thumbnail pictures612, and the intros613are allocated to the respective entries in the index data atom600.

FIGS. 9A to 9Dshow examples of the positional information units of the actual data blocks allocated to the property track atom520, the text track atom530, the thumbnail track atom540, and the intro track atom550. In each of the property track atom520, the text track atom530, the thumbnail track atom540, and the intro track atom550, a relative byte position (RBP) relative to the start byte of each data (chunk), such as the property700, the text611, the thumbnail picture612, or the intro613, and the data length thereof are allocated every field name.

Referring toFIG. 10, each property700includes a property entry header710, basic property data740, and property extension data750, serving as chunks. The property entry header710contains information necessary to manage the corresponding managed file in the hierarchical structure. The basic property data740contains basic attribute information segments about the corresponding content file210, e.g., an information segment regarding the file format of the content file210, that regarding the creation time thereof, that regarding the modification time thereof, and a file identifier. The property extension data750includes extended data of the basic property data740.

FIG. 11shows the structure of the property entry header710. Referring toFIG. 11, the property entry header710includes an entry number711, a parent entry number712, property entry flags720, a play order713, an entry data size714, and a next-extends-entry715.

The entry number711is data to identify the corresponding entry. A unique code is given to the entry number711. When a content file210(or a folder) to be managed is entered in the index file220, a number that increases from zero can be assigned as an entry number711to the corresponding entry in order of entering the content files210in the index file220. The entry number711specifies the corresponding managed content file210. When an entry number is defined as a stepping number to be assigned in the entering order, a region for the entry number can be omitted. The parent entry number712indicates an entry number of an entry that the corresponding entry belongs to.

The property entry flags720set the attributes of the corresponding entry.FIG. 12shows an example of the arrangement of the property entry flags720. In the arrangement ofFIG. 12, there are a flag721indicating whether the corresponding entry is original or favorite, a flag722indicating whether the entry is a folder or a file, a flag723indicating that the corresponding region is an extension region of the entry, a flag724indicating whether the entry is valid or invalid, a flag725indicating that the entered file refers to another file, a flag726indicating that the entered file is a child file, a flag727indicating that the entered file is a parent file, a flag728indicating whether the text included in the entry has an extended area, a flag729indicating whether the thumbnail picture included in the entry has an extended area, and a flag731indicating whether the intro included in the entry has an extended area.

Among them, the flag722indicating whether the corresponding entry is a file or a folder is assigned to a first bit. An entry related to a folder can be set by user settings.

The flag724indicates whether the corresponding entry is valid or invalid. According to the present embodiment, e.g., when one content file210is deleted, the corresponding flag724is switched so as to indicate that the content file210is invalid, thus modifying the contents of the index file220.

As shown inFIG. 13, the basic property data740includes format brand information741indicating the file format of the corresponding content file210, media profile information742regarding decoding, contents status flags743, serving as flags related to the contents of the content file210, creation time information744, modification time information745, duration information746, a binary file identifier747, referred counter information748.

In the basic property data740, the creation time information745indicates the creation time of the corresponding content file210. The modification time information746indicates the modification time of the content file210, e.g., the time when the content file210has been modified by editing. Inconsistency detection information units can be generated on the basis of the creation time information745and the modification time information746, respectively.

The contents status flags743include a flag indicating whether the management information about the corresponding content file210includes a chunk corresponding to the title, a flag indicating whether the management information thereof includes a chunk corresponding to a thumbnail image, a flag indicating whether the management information thereof includes a chunk corresponding to an intro, and information indicative of the type of content (e.g., moving images, still images, or audio data).

The binary file identifier747describes the location of the corresponding content file210. Referring to the binary file identifier747, the directory which the corresponding content file210belongs to can be specified in the file system.

According to the present embodiment, as shown inFIG. 14A, the file names of the managed content files210recorded on the recording medium200or the folder names of the corresponding folders are allocated to the binary file identifiers747, respectively. On the basis of the file name of the content file210allocated to the binary file identifier747, one of the inconsistency detection information units can be generated.

When the location of each file is not displayed in the region for the binary file identifiers747, the location of each file is described in the property extension data750(seeFIG. 10) included in the corresponding property700in the index data atom600. In the case where the property extension data750describes the location of the corresponding content file210, the location is expressed as URL (Uniform Resource Locator).

In the above-mentioned index file220, the content files210are arranged as entries in a virtual folder structure as shown inFIGS. 14A and 14Busing the entry numbers711of the content files210, the property entry flags720, the parent entry numbers712, the binary file identifiers747, or the URLs described in the property extension data segments750included in the properties700in the index data atom600.

Table ofFIG. 14Ashows the entry numbers711of the respective entries in the folder structure shown in part A ofFIG. 4, the flags722each indicating whether the corresponding entry is a file or a folder, the parent entry numbers712, and the binary file identifiers747or the URLs.

Referring toFIG. 14A, the index file220includes the entries numbered 0 to 7. As shown by the flags722, the entries numbered 0, 3, and 4 are folder entries. On the other hand, the entries numbered 1, 2, 5, 6, and 7 are file entries.

Each parent entry number712indicates the parent entry that the corresponding entry belongs to. Each binary file identifier747relates the file entry to the corresponding content file210recorded on the recording medium200using a file name.

On the basis of the above-mentioned structure of the index file220, a folder structure is constructed as shown inFIG. 14B. In other words, inFIG. 14B, according to the index file220, the virtual folder structure is established independent of the directory structure in the file system. In this folder structure, a folder entry E-0contains a folder entry E-3and file entries E-1and E-2in the lower level. The folder entry E-3contains a folder entry E-4and a file entry E-5in the lower level. The folder entry E-4contains file entries E-6and E-7in the lower level.

Inconsistency detection information will now be described with reference toFIG. 15. The inconsistency detection information is used to determine whether the contents of the index file220are inconsistent with the recording status of the content files210actually recorded on the recording medium200. The inconsistency detection information can be provided in, e.g., the header of the index file220. In the above-mentioned structure of the index file220for the QT movie files, the inconsistency detection information can be allocated to the movie header atom510.

FIG. 15shows an example of the structure of inconsistency detection information800according to the present embodiment of the present invention. When the content files210are recorded on the recording medium200in the directory structure according to the predetermined file system, the inconsistency detection information800is provided every directory in the file system.

Referring toFIG. 15, the inconsistency detection information800includes three kinds of inconsistency detection information units, i.e., inconsistency detection information810about the total number of files for each directory, a modification time checksum820, and a file name checksum830. The inconsistency detection information810concerns the total number of content files210included in the corresponding directory. The modification time checksum820indicates inconsistency detection information regarding the modification times of the respective content files210in the corresponding directory. The modification time checksum820is generated from values corresponding to the respective modification times. The file name checksum830indicates inconsistency detection information regarding the names of the content files210in the corresponding directory. The file name checksum830is generated from values corresponding to the respective file names.

The inconsistency detection information units800inFIG. 15correspond to the directories in part B ofFIG. 4. The inconsistency detection information810regarding the total number of content files210(hereinafter, referred to as total-files information810), the modification time checksum820, and the file name checksum830are provided every directory, i.e., in each of the directory DirA, the directory DirB (DirA/DirB), and the directory DirC (DirA/DirC) on the file system in part B ofFIG. 4. The directories DirB and DirC belong to the directory DirA.

The above-mentioned inconsistency detection information units810to830are provided on the assumption that an inconsistency between the contents of the index file220and the recording status of the content files210on the recording medium200will occur due to a file operation directly performed in the file system by the user. In other words, the use of the total-files information units810effectively detects an inconsistency that occurs when the user directly adds or deletes a content file210in the file system. The use of the modification time checksums820effectively detects an inconsistency that occurs when the user overwrites or edits a content file210in the file system or when the user adds or deletes a content file210. The use of the file name checksums830effectively detects an inconsistency that occurs when the user directly changes the file name of a content file210in the file system or when the user adds or deletes a content file210.

The kinds of inconsistency detection information units800are not limited to the above-mentioned examples. One or two kinds of inconsistency detection information units may be held as necessary. In addition, another kind of inconsistency detection information unit may be further held.

As another kind of inconsistency detection information unit, e.g., information regarding the creation time of the content file210that is the most recently created one of the content files210contained in the corresponding directory or information concerning the modification time of the content file210that is the last modified file in the directory may be used. This information may be data indicative of the creation time of the file or the modification time thereof. Alternatively, the information may be a checksum obtained from the corresponding data. Consequently, when an inconsistency occurs between the contents of the index file220and the recording status of the content files210on the recording medium200due to the addition or editing of the content file210to be managed, the inconsistency can be detected at high speed.

The inconsistency detection information units810to830are generated by the inconsistency detection information generating unit162(seeFIG. 2) and are then stored in, e.g., the header of the index file220. When a content file210is added, deleted, or edited, the contents of the index file220are updated through the software170of the file management apparatus160. Simultaneously, the inconsistency detection information800is updated in accordance with the management information associated with the added, deleted, or edited content file210.

A method for generating the inconsistency detection information800will now be described.

In the inconsistency detection information800, the total-files information810indicates the number of content files210included in the corresponding directory in the file system. For instance, in the file system shown in part B ofFIG. 4, the directory DirA contains the lower-level directories DirB and DirC but does not include a content file210. As shown inFIG. 15, therefore, the total-files information810about the directory DirA indicates “0”. Similarly, since the directory DirB includes three files File1, File2, and File3, the total-files information810about the directory DirA/DirB indicates “3”. Similarly, since the directory DirA/DirC includes two files File4and File5, the total-files information810about the directory DirA/DirC indicates “2”.

The total-files information810is updated at the time when a content file210is added to (i.e., recorded on) or deleted from the recording medium200. In other words, when a content file210is added to the recording medium200, the number of files in the corresponding directory is increased by one. When any one of the managed content files210is deleted from the recording medium200, the number of files in the directory which the deleted content file210belonged to is reduced by one. When an arbitrary content file210is modified by editing, the number of files recorded on the recording medium200is not changed. Accordingly, the total-files information810, serving as the inconsistency detection information800, is not updated.

The modification time checksum820will now be described. The modification time checksum820is generated every directory in the file system. Each modification time checksum820is generated on the basis of the modification times of all of the files included in the corresponding directory. The generation of the modification time checksum820will be described in detail with reference toFIG. 16.

It is assumed that when the number of files included in an arbitrary directory in the file system is M, the content files210in the directory are set to files F1, F2, . . . , and FMas shown inFIG. 16. When the byte length of modification time data associated with each content file210is k, the sequence of k bytes corresponding to the modification time data associated with, e.g., the file FMcan be expressed by TM1, TM2, . . . , TMk.

When the file format of the recording medium200is, e.g., UDF (Universal Disk Format), the modification time data associated with each content file210includes a data segment named “timezone”, that named “year”, that named “month”, that named “day”, that named “hour”, that named “min”, that named “sec”, that named “centisec”, that named “microsec100”, and that named “microsec”. Two bytes are assigned to each of the data segment “timezone” and that “year”. One byte is assigned to each of the other data segments. The sequence of bytes corresponding to the modification time data of each UDF file can be expressed by Ti1, Ti2, . . . , Ti12.

A bit string generated from the sequence of bytes corresponding to the modification time data is obtained every content file210included in each target directory. In other words, as for the file FMinFIG. 16, a bit string is generated by taking the exclusive OR of values constituting respective data segments included in the bytes corresponding to the modification time data of the file FM. The bit string is expressed by CTM. For instance, as for each UDF file shown inFIG. 16, a bit string CTiof one byte generated from the modification time data of one file is obtained by taking the exclusive OR of the bytes Ti1, Ti2, . . . , Ti12.

Further, a modification time checksum CT of each target directory is generated by taking the exclusive ORs of the bit strings indicative of the modification times of the respective files (refer toFIG. 16).

When a content file210to be recorded on the recording medium200is added or the content file210is deleted from or modified in the recording medium200, the value of the modification time checksum820is simultaneously updated.

When the content file210is added to the recording medium200, the modification time checksum820of the directory containing the added content file210is obtained by taking the exclusive OR of the bit string constituting the original checksum and a bit string generated from the modification time data of the added content file210.

When the content file210is deleted from the recording medium200, the modification time checksum820of the directory in which the content file210is deleted is obtained by taking the exclusive OR of the bit string constituting the original checksum and a bit string generated from the modification time data of the deleted file.

When the contents of the content file210recorded on the recording medium200are modified, the modification time checksum820of the directory including the modified content file210is newly obtained by taking the exclusive OR of the bit string constituting the original checksum, a bit string generated from the modification time data of the content file210before the modification, and a bit string generated from the modification time data of the modified content file210.

The file name checksum830will now be described with reference toFIG. 18. Each file name checksum830is generated on the basis of the names of the managed content files210included in the corresponding directory in the file system.

When the number of content files210included in an arbitrary directory in the file system is M, the content files210in the directory are set to files F1, F2, . . . , and FM. When the byte length of file name data associated with each content file210is k, the sequence of k bytes corresponding to the file name data associated with, e.g., the content file FMcan be expressed by NM1, NM2, . . . , NMk. A bit string generated from the sequence of bytes corresponding to the file name data is obtained every content file210. In other words, as for the file FMinFIG. 18, a bit string is generated by taking the exclusive OR of values constituting respective data segments included in the bytes corresponding to the file name data of the file FM. The bit string is expressed by CNM.

Further, a file name checksum CN (830) of a target directory is generated by taking the exclusive OR of generated bit strings of the respective content file210.

When a content file210is added to, deleted from, or modified in the recording medium200, the file name checksum830is simultaneously updated.

When a content file210to be managed is added to the recording medium200, the file name checksum830of the directory containing the added content file210is newly obtained by taking the exclusive OR of the bit string constituting the original checksum and a bit string generated from the file name data of the added content file210.

When the content file210is deleted from the recording medium200, the file name checksum830of the directory in which the content file210is deleted is obtained by taking the exclusive OR of the bit string constituting the original checksum and a bit string generated from the file name data of the deleted file.

When the contents of any of the content files210recorded on the recording medium200are modified, the name of the modified content file210is not changed. Accordingly, the file name checksum830is not changed. In other words, the file name checksum830of the directory containing the modified content file210is the same as that obtained from the original bit strings.

When a new directory is added to the recording medium200, items (i.e., inconsistency detection information units) corresponding to the new directory are added to the existing inconsistency detection information800. Each of the total-files information810, the modification time checksum820, and the file name checksum830associated with the added directory are set to “0”.

On the other hand, when an arbitrary directory is deleted from the recording medium200, the items corresponding to the deleted directory are deleted from the existing inconsistency detection information800. When the name of an arbitrary directory is changed, the corresponding directory name in the inconsistency detection information800is changed.

The operation of the file management apparatus160according to the present embodiment of the present invention will now be described with reference toFIG. 19.

FIG. 19shows an inconsistency detecting process executed by the file management apparatus160according to the present embodiment of the present invention. When the inconsistency detecting process is started, whether there is at least one directory that is not checked for inconsistency (i.e., unchecked directory) in the file system is determined (step S911).

Checking directories for inconsistency means determining whether the recording status of the content files210included in the directory to be checked is inconsistent with the contents of the index file220according to the following steps, i.e., S912to S922.

When there are unchecked directories, one of the directories is selected (step S912).

When it is determined that the inconsistency detection information800held in the index file220includes items corresponding to the selected directory (i.e., target directory) (YES in step S913), the recording status detecting unit163obtains the total number of content files210in the target directory from the file system in the recording medium200(step S915).

If the inconsistency detection information800does not include the items corresponding to the target directory (NO in step S913), this means that the index file220does not manage at least one content file210contained in the target directory. The inconsistency detecting unit164determines that an inconsistency exists between the contents of the index file220and the recording status of the content files210. The inconsistency detecting process then terminates (step S914).

On the other hand, when it is determined that the numbers of content files210match (YES in step S916), the recording status detecting unit163obtains data regarding the modification times of all of the content files210contained in the target directory from the file system. The inconsistency detecting unit164calculates a checksum regarding the modification times in the foregoing manner (step S917).

The inconsistency detecting unit164compares the obtained checksum with the modification time checksum820about the target directory included in the inconsistency detection information800. If the checksums do not match (NO in step S918), it is determined that the contents of the index file220are inconsistent with the recording status of the content files210on the recording medium200. The inconsistency detecting process then terminates (step S914).

On the other hand, when the modification time checksums match (YES in step S918), the recording status detecting unit163obtains the names of all of the content files210contained in the target directory from the file system.

The inconsistency detecting unit164calculates a checksum regarding the file names obtained by the recording status detecting unit163in the foregoing manner (step S919) and then compares the obtained checksum with the file name checksum830, associated with the target directory, included in the inconsistency detection information800. If the file name checksums do not match (NO in step S921), it is determined that the contents of the index file220are inconsistent with the recording status of the content files210. The inconsistency detecting process then terminates (step S914).

On the other hand, if the file name checksums match (YES in step S921), the process is returned to step S911. The process is continued until all of the directories are subjected to the above-mentioned inconsistency detecting process. When the inconsistency detecting process for each of the directories is completed (NO in step S911), it is determined that the contents of the index file220are consistent with the recording status of the content files210on the recording medium200(step S922) and the process then terminates.

When an inconsistency is detected between the contents of the index file220and the recording status of the content files210on the recording medium200, a specified directory having an inconsistent portion and the file containing the directory are corrected, i.e., the corresponding portion in the index file220and the corresponding inconsistency detection information800are corrected so that the contents of the index file220are consistent with the recording status of the content files210on the recording medium200. In this instance, after the index file220and the inconsistency detection information800are corrected, the inconsistency detecting process may be restarted, i.e., the process may be performed to unchecked directories. Alternatively, even when a directory having an inconsistent portion is detected, the inconsistency detecting process may be continuously performed to unchecked directories until all of the directories each having an inconsistent portion are specified.

As mentioned above, according to the present embodiment of the present invention, upon determining whether an inconsistency exists between the contents of the index file220and the recording status of the content files210on the recording medium200, the inconsistency can be detected on the basis of the inconsistency detection information800at high speed without checking management information about each of the content files210included in the index file220against the corresponding content file210.

According to the present embodiment, since the inconsistency detection information800is provided every directory containing the content files210, whether an inconsistency exists can be determined every directory on the basis of the inconsistency detection information. Since inconsistency checking is performed every directory, even if the number of content files210is large, a process of, e.g., obtaining the number of files or calculating a creation time checksum or a modification time checksum can be performed at high speed.

The inconsistency detection information800includes the total-files information810for each directory in the file system. Therefore, even if an inconsistency between the contents of the index file220and the recording status of the content files210on the recording medium200occurs upon the addition or deletion of a content file210, the inconsistency can be detected at high speed. In many cases, the inconsistency therebetween may occur upon adding or deleting a content file210or changing the name thereof. Accordingly, whether an inconsistency exists is checked on the basis of the total-files information810before checking based on other inconsistency detection information units. Consequently, whether an inconsistency exists can be determined at high speed.

In addition, the inconsistency detection information800includes the modification time checksum820associated with the content files210contained in each directory in the file system. Even when an inconsistency between the contents of the index file220and the recording status of the content files210on the recording medium200occurs upon adding, deleting, overwriting, or editing a content file210on the recording medium200, the inconsistency can be detected at high speed.

Further, the inconsistency detection information800includes the file name checksum830associated with the content files210included in each directory in the file system. Even when an inconsistency between the contents of the index file220and the recording status of the content files210on the recording medium200occurs upon adding or deleting a content file210on the recording medium200or changing the name of a content file210, the inconsistency can be detected at high speed.

According to the present embodiment, the file management apparatus160includes the inconsistency detection information generating unit162for generating inconsistency detection information, i.e., the total-files information810, the modification time checksum820, and the file name checksum830from management information units about respective content files210every directory. Accordingly, in addition to the generation of inconsistency detection information, even when a content file210is added to or deleted from the recording medium200or when the name of a content file210is changed, the inconsistency detection information800can be updated in response to the addition, deletion, or change.

The inconsistency detecting unit164determines, on the basis of the three kinds of inconsistency detection information units800, i.e., the total-files information810, the modification time checksum820, and the file name checksum830, whether an inconsistency exists between the contents of the index file220and the recording status of the content files210on the recording medium200. Therefore, the precision of determination can be increased.

It will be apparent that the present invention is not limited to the above-mentioned embodiment but many modifications and variations are possible without departing from the spirit and scope of the present invention. For instance, according to the above-mentioned embodiment, to manage the content files210on the basis of the index file220, the content files210are managed in the virtual folder structure. The content files210may be managed in the directory structure on the file system. It is unnecessary to specially construct the virtual folder structure.

According to the above-mentioned embodiment, the file management apparatus160manages the content files210, which have been recorded on the recording medium200through the video recording apparatus100. The file management apparatus according to the embodiment of the present invention is not limited to this example. The file management apparatus according to the embodiment of the present invention can be applied to any apparatus for recording a file on a recording medium.

According to the above-mentioned embodiment, the QuickTime file format is used as the file format of the content file210. The file format of a file to be managed in the file management apparatus according to the embodiment of the present invention is not limited to this example. In addition, the file management apparatus160according to the embodiment has the index file220having the same file format structure as that of the content files210. The structure of the index file according to the embodiment of the present invention is not limited to this example. So long as the index file includes management information partially extracted from the contents of the managed files, the structure of the index file may be properly modified.

According to the above-mentioned embodiment, in the inconsistency detecting process, checking for inconsistency based on the total-files information810(step S916), that based on the modification time checksum820(step S918), and that based on the file name checksum830(step S921) are performed in that order. The order of steps is not limited to this example. The order of steps may be properly changed.

According to the embodiment, the inconsistency detecting unit164calculates a modification time checksum and a file name checksum on the basis of the recording status of the content files210detected by the recording status detecting unit163. The functions of the units are not limited to this example. For instance, the recording status detecting unit163may detect the recording status of the content files210and simultaneously generate checksums on the basis of the recording status so that the generated checksums can be compared with the inconsistency detection information800.

The above-mentioned embodiment of the present invention shows an example to embody the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and alterations may occur depending on design requirements and other factors insofar as they are within the scope of the appended claims or the equivalents thereof.

Steps of the inconsistency detecting process explained in the above-mentioned embodiment of the present invention may be regarded as a method including a series of steps. In addition, the series of steps may be regarded as a program that allows a computer to execute the steps and a recording medium storing the program.