Spaces:
Running
on
Zero
Running
on
Zero
Update file_utils.py
Browse files- file_utils.py +1 -1
file_utils.py
CHANGED
@@ -31,7 +31,7 @@ def get_file_summary(file_path, file_type):
|
|
31 |
"modification_date": modification_date
|
32 |
}
|
33 |
|
34 |
-
def read_file_content(file_path, max_size=
|
35 |
with open(file_path, "r", encoding="utf-8", errors="ignore") as file:
|
36 |
if os.path.getsize(file_path) > max_size:
|
37 |
return file.read(max_size) + "\n... [Content Truncated] ..."
|
|
|
31 |
"modification_date": modification_date
|
32 |
}
|
33 |
|
34 |
+
def read_file_content(file_path, max_size=16*1024):
|
35 |
with open(file_path, "r", encoding="utf-8", errors="ignore") as file:
|
36 |
if os.path.getsize(file_path) > max_size:
|
37 |
return file.read(max_size) + "\n... [Content Truncated] ..."
|