We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a527fc commit 35d8328Copy full SHA for 35d8328
1 file changed
ofunctions/file_utils/__init__.py
@@ -18,8 +18,8 @@
18
__copyright__ = "Copyright (C) 2017-2024 Orsiris de Jong"
19
__description__ = "File/dir/permissions/time handling"
20
__licence__ = "BSD 3 Clause"
21
-__version__ = "1.2.4"
22
-__build__ = "2022110601"
+__version__ = "1.2.5"
+__build__ = "2026031601"
23
__compat__ = "python2.7+"
24
25
import json
@@ -871,3 +871,10 @@ def get_writable_random_file(
871
),
872
)
873
return None
874
+
875
876
+def sanitize_filename(file: str) -> str:
877
+ """
878
+ Sanitizes a filename so we're sure it can be used on all platforms
879
880
+ return "".join(x if x.isalnum() else "_" for x in file)
0 commit comments