From b2eca338490c03bdc586e6f2e55ca0cccec169b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Achim=20G=C3=A4dke?= <135793393+AchimGaedkeLynker@users.noreply.github.com> Date: Fri, 27 Feb 2026 16:23:43 +1300 Subject: [PATCH 1/2] #114 Fixup FSPath.info to work with s3fs --- airflow_code_editor/fs.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/airflow_code_editor/fs.py b/airflow_code_editor/fs.py index 776376e..bde1f49 100644 --- a/airflow_code_editor/fs.py +++ b/airflow_code_editor/fs.py @@ -519,16 +519,16 @@ def stat(self) -> os.stat_result: info = self.root_fs.info(self.path) return os.stat_result( ( - info["mode"], - info["ino"], + info.get("mode", None), + info.get("ino", None), None, - info["nlink"], - info["uid"], - info["gid"], + info.get("nlink", None), + info.get("uid", None), + info.get("gid", None), info["size"], None, - info["mtime"], - info["created"], + info.get("mtime", info.get("LastModified", None)), + info.get("created", None), ) ) From e98c2418eb5634408ce155ae6063046b4ff598a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Achim=20G=C3=A4dke?= <135793393+AchimGaedkeLynker@users.noreply.github.com> Date: Fri, 27 Feb 2026 17:35:56 +1300 Subject: [PATCH 2/2] Update stat method to handle mtime conversion Added handling for mtime to convert datetime to timestamp. --- airflow_code_editor/fs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/airflow_code_editor/fs.py b/airflow_code_editor/fs.py index bde1f49..510fb12 100644 --- a/airflow_code_editor/fs.py +++ b/airflow_code_editor/fs.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License +import datetime import errno import os from dataclasses import dataclass @@ -517,6 +518,10 @@ def delete(self) -> None: def stat(self) -> os.stat_result: "File stat" info = self.root_fs.info(self.path) + mtime = info.get("mtime", info.get("LastModified", None)) + if isinstance(mtime, datetime.datetime): + # todo: timezone? + mtime = mtime.timestamp() return os.stat_result( ( info.get("mode", None), @@ -527,7 +532,7 @@ def stat(self) -> os.stat_result: info.get("gid", None), info["size"], None, - info.get("mtime", info.get("LastModified", None)), + mtime, info.get("created", None), ) )