TimeStamp = os.stat(FileFullPath)[8]\r
File = FileClass(-1, Name, Ext, Filepath, FileFullPath, Model, '', [], [], [])\r
return self.Insert(File.Name, File.ExtName, File.Path, File.FullPath, File.Model, TimeStamp)\r
+ \r
+ ## Get ID of a given file\r
+ #\r
+ # @param FilePath Path of file\r
+ #\r
+ # @retval ID ID value of given file in the table\r
+ #\r
+ def GetFileId(self, File):\r
+ QueryScript = "select ID from %s where FullPath = '%s'" % (self.Table, str(File))\r
+ RecordList = self.Exec(QueryScript)\r
+ if len(RecordList) == 0:\r
+ return None\r
+ return RecordList[0][0]\r