class_docstr: A file-like object that reads only the first part of a file.
  
  Useful to upload a file to the Hub when the user might still be appending data to it. Only the first part of the
  file is uploaded (i.e. the part that was available when the filesystem was first scanned).
  
  In practice, only used internally by the CommitScheduler to regularly push a folder to the Hub with minimal
  disturbance for the user. The object is passed to `CommitOperationAdd`.
  
  Only supports `read`, `tell` and `seek` methods.
  
  Args:
      file_path (`str` or `Path`):
          Path to the file to read.
      size_limit (`int`):
          The maximum number of bytes to read from the file. If the file is larger than this, only the first part
          will be read (and uploaded).
class_docstr_tok: ["A","file-like","object","that","reads","only","the","first","part","of","a","file",".","Useful","to","upload","a","file","to","the","Hub","when","the","user","might","still","be","appending","data","to","it",".","Only","the","first","part","of","the","file","is","uploaded","(","i.e",".","the","part","that","was","available","when","the","filesystem","was","first","scanned",")",".","In","practice",",","only","used","internally","by","the","CommitScheduler","to","regularly","push","a","folder","to","the","Hub","with","minimal","disturbance","for","the","user",".","The","object","is","passed","to","`","CommitOperationAdd","`",".","Only","supports","`","read","`",",","`","tell","`","and","`","seek","`","methods",".","Args",":","file_path","(","`","str","`","or","`","Path","`",")",":","Path","to","the","file","to","read",".","size_limit","(","`","int","`",")",":","The","maximum","number","of","bytes","to","read","from","the","file",".","If","the","file","is","larger","than","this",",","only","the","first","part","will","be","read","(","and","uploaded",")","."]
code: def __len__(self) -> int:
      return self._size_limit
  
imports: import atexit
  import logging
  import os
  import time
  from concurrent.futures import Future
  from dataclasses import dataclass
  from io import SEEK_END, SEEK_SET, BytesIO
  from pathlib import Path
  from threading import Lock, Thread
  from typing import Dict, List, Optional, Union
  from .hf_api import IGNORE_GIT_FOLDER_PATTERNS, CommitInfo, CommitOperationAdd, HfApi
  from .utils import filter_repo_objects
label_desc: Use image node_id 4 for calling the PartialFileIO obj's underlying member method code with example usage: obj.__len__() and returns: self