class_docstr: The XarFile Class provides an interface to tar/rar/zip archives.
  
  Args:
      name(str) : file or directory name to be archived
      mode(str) : specifies the mode in which the file is opened, it must be:
          ========   ==============================================================================================
          Charater   Meaning
          --------   ----------------------------------------------------------------------------------------------
          'r'        open for reading
          'w'        open for writing, truncating the file first, file will be saved according to the arctype field
          'a'        open for writing, appending to the end of the file if it exists
          ========   ===============================================================================================
      arctype(str) : archive type, support ['tar' 'rar' 'zip' 'tar.gz' 'tar.bz2' 'tar.xz' 'tgz' 'txz'], if
                     the mode if 'w' or 'a', the default is 'tar', if the mode is 'r', it will be based on actual
                     archive type of file
class_docstr_tok: ["The","XarFile","Class","provides","an","interface","to","tar\/rar\/zip","archives",".","Args",":","name","(","str",")",":","file","or","directory","name","to","be","archived","mode","(","str",")",":","specifies","the","mode","in","which","the","file","is","opened",",","it","must","be",":","========","==============================================================================================","Charater","Meaning","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","'","r","'","open","for","reading","'","w","'","open","for","writing",",","truncating","the","file","first",",","file","will","be","saved","according","to","the","arctype","field","'","a","'","open","for","writing",",","appending","to","the","end","of","the","file","if","it","exists","========","===============================================================================================","arctype","(","str",")",":","archive","type",",","support","[","'tar","'","'rar","'","'zip","'","'tar.gz","'","'tar.bz2","'","'tar.xz","'","'tgz","'","'txz","'","]",",","if","the","mode","if","'","w","'","or","'","a","'",",","the","default","is","'tar","'",",","if","the","mode","is","'","r","'",",","it","will","be","based","on","actual","archive","type","of","file"]
code: def __enter__(self):
      return self
  
imports: import os
  import tarfile
  import zipfile
  from typing import List, Generator, Callable
  import rarfile
label_desc: Use image node_id 3 for calling the XarFile obj's underlying member method code with example usage: obj.__enter__() and returns: self