Skip to content

Metadata

rich-murphey edited this page Jul 21, 2019 · 4 revisions

Metadata of each file is preserved in YAML format (see Example raw metadata). By default, files are stored in a path in ./download, and their metadata in ./download/metadata. For foo.doc, the file and its metadata paths would be:

Time Stamps

Google Drive time stamps have millisecond resolution. Typical Windows and Unix file systems have greater resolution. In practice this allows Kumodd to set file system time stamps to match exactly the time stamps in Google Drive.

Kumodd maps Google Drive time stamps to file system time stamps as follows:

Google Drive Time Stamp File System Time Stamp
modifiedDate Last Modified time
lastViewedByMeDate Last Accessed time
createdDate Created time

Last Access times can be altered by subsequent access to downloaded files. This can be avoided on Linux using the noatime mount option. It can be avoided on Windows using fsutil behavior set disablelastaccess 1.

Created Time can be set on Windows NTFS; however, setting the Created time in python via the win32 API has proven unreliable. On Unix, certain more recent file systems have a created time stamp, including Ext4, UFS2, Hammer, LFS, and ZFS (see Wikipedia Comparison of File Systems). However, the Linux kernel provides no method (e.g. system call or library) to read or write the Created time, so Created time is not available to kumodd on Linux.

If file system time stamps are to be used in analysis, the -verify option can be used to verify they are consistent with the metadata. External tools can be used as well for verification of accuracy. Given a downloaded file set, kumodd -verify will verify the file system time stamps are equal to the time stamps that were retrieved from the Google Drive API.

Duplicate File Names

Google Drive folders can hold duplicate file names that are differentiated by their version number. Unix and Windows file systems require filenames within a folder are unique. So, for version number > 1, kumodd appends '(version)' before the extension. For example: ./My Drive/Untitled document(12).pdf