You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/helpers.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -246,9 +246,13 @@ Tinyscript also provides modified/additional `pathlib`-related classes:
246
246
-`choice(*filetypes:str)`: chooses a random file in the current folder among the given extensions (mentioning the dot ; e.g. `.py`)
247
247
-`find(name:str, regex:bool)`: finds a file or folder, using `name` as a regex or not
248
248
-`generate(prefix:str, suffix:str, length:int, alphabet:str)`: generates a random folder name (guaranteed to be non-existent) using the given prefix, suffix, length and alphabet, and returns the joined path
249
+
-`is_executable()`: checks whether the path is executable
249
250
-`is_hidden()`: checks whether the current file/folder is hidden
251
+
-`is_in_path_env_var()`: checks whether the path (if not a folder, its `.dirname`) is in the `PATH` environment variable
252
+
-`is_readable()`: checks whether the path is readable
250
253
-`is_samepath(other_path:str|Path)`: checks whether the given path is the same
251
254
-`is_under(path:str|Path)`: checks whether the path is under the given parent path
255
+
-`is_writable()`: checks whether the path is writable
252
256
-`iterfiles()`: iterates over files only
253
257
-`iterpubdir()`: iterates over visible directories only
254
258
-`listdir(filter_func:lambda, sort:bool)`: list the current path based on a filter function, sorted or not
0 commit comments