Directory
Read and write files and directories.
To use these operators, add the import to the program:
Import "ranger-dir.rgr"Source: lib/ranger-dir.rgr.
| Operator | Arguments | Gives |
|---|---|---|
cs_list_dir_files |
path: string | [string] |
file_created |
path: string | int |
file_modtime |
path: string | int |
file_modtime_str |
path: string | int |
list_dir_files |
path: string | [string] |
remove_file |
path: string, name: string | void |
to_date |
timevalue: int | SystemDate |
utc_to_string |
sd: int | string |
watch_dir |
path: string, code: block | void |
watch_filename |
— | string |
watch_has_file |
— | boolean |
Target support marks
- Own template
- Default template
- No template
The operator works for a target with an own template and for a target with the default template. The default template is the * entry of the definition: it writes the same code for every target that has no template of its own. A target with no template writes no code, and a program that uses the operator does not compile for that target.
cs_list_dir_files
(cs_list_dir_files path) → [string]
cs_list_dir_files(path: string)Target support
- JavaScript: no template
- TypeScript: no template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: own template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 72
file_created
(file_created path) → int
file_created(path: string)Target support
- JavaScript: own template
- TypeScript: own template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: no template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 43
file_modtime
(file_modtime path) → int
file_modtime(path: string)Target support
- JavaScript: own template
- TypeScript: own template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: no template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 49
file_modtime_str
(file_modtime_str path) → int
file_modtime_str(path: string)Target support
- JavaScript: own template
- TypeScript: own template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: no template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 55
list_dir_files
(list_dir_files path) → [string]
list_dir_files(path: string)Path.GetFileName
Target support
- JavaScript: own template
- TypeScript: own template
- Go: own template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: own template
- C++: own template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 80
remove_file
(remove_file path name) → void
remove_file(path: string, name: string)Target support
- JavaScript: own template
- TypeScript: own template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: no template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 30
to_date
(to_date timevalue) → SystemDate
to_date(timevalue: int)statSync
Target support
- JavaScript: own template
- TypeScript: own template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: no template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 24
utc_to_string
(utc_to_string sd) → string
utc_to_string(sd: int)Target support
- JavaScript: own template
- TypeScript: own template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: no template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 37
watch_dir
(watch_dir path code) → void
watch_dir(path: string, code: block)Target support
- JavaScript: own template
- TypeScript: own template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: no template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 66
watch_filename
(watch_filename) → stringTarget support
- JavaScript: own template
- TypeScript: own template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: no template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 61
watch_has_file
(watch_has_file) → booleanTarget support
- JavaScript: own template
- TypeScript: own template
- Go: no template
- Rust: no template
- Python: no template
- Java: no template
- Kotlin: no template
- Dart: no template
- Swift: no template
- C#: no template
- C++: no template
- PHP: no template
- Scala: no template
Definition: lib/ranger-dir.rgr, line 17
Ranger 3.5.1 · commit f323fd4 · development build