class_docstr: File-based Code Driver handles source control management for the project with files
      
class_docstr_tok: ["File-based","Code","Driver","handles","source","control","management","for","the","project","with","files"]
docstr: Returns the current ref of the code (may not be a commit id, if not saved)
  
  Returns
  -------
  commit_id : str
      the current commit_id (this may not be a commit id)
  
  Raises
  ------
  CodeNotInitialized
      error if not initialized (must initialize first)
docstr_tok: ["Returns","the","current","ref","of","the","code","(","may","not","be","a","commit","id",",","if","not","saved",")","Returns","--","--","--","-","commit_id",":","str","the","current","commit_id","(","this","may","not","be","a","commit","id",")","Raises","--","--","--","CodeNotInitialized","error","if","not","initialized","(","must","initialize","first",")"]
code: def current_ref(self):
      """Returns the current ref of the code (may not be a commit id, if not saved)
  
      Returns
      -------
      commit_id : str
          the current commit_id (this may not be a commit id)
  
      Raises
      ------
      CodeNotInitialized
          error if not initialized (must initialize first)
      """
      if not self.is_initialized:
          raise CodeNotInitialized()
      tracked_filepaths = self._get_tracked_files()
      return self._calculate_commit_hash(tracked_filepaths)
  
imports: import os
  import shutil
  import errno
  import pathspec
  import tempfile
  import hashlib
  import checksumdir
  from datmo.core.util.misc_functions import list_all_filepaths
  from datmo.core.util.i18n import get
  from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, UnstagedChanges, CodeNotInitialized, CommitDoesNotExist
  from datmo.core.controller.code.driver import CodeDriver
label_desc: Use image node_id 11 for calling the FileCodeDriver obj's underlying member method code with example usage: obj.current_ref() and returns: self