EXPRESSIONS

Файл

[the] (file[s]|dir[ector(y|ies)]) [path] %strings%
set {_file} to file "eula.txt"

Получить абсолютный путь к файлу

Абсолютный путь начинается с root

absolute path of %path%
%path%'s absolute path
set {_file} to absolute path of file "eula.txt"

Получить все файлы в директории

files in %path%
loop all files in dir "plugins/":
  broadcast "%loop-value%"

Получить текстовое содержание файла

Может быть изменено с использованием SET

content[s] of %path%
%path%'s content[s]
set {_file} to content of file "eula.txt"
replace all "false" with "true" in {_file}
set content of file "eula.txt" to {_file}

Имя файла или директории

Может быть изменено с использованием SET

name of %path%
%path%'s name
loop all files in dir "plugins/":
  broadcast name of file loop-value

Прочитать линии файла

Может быть изменено с использованием SET

[the] line %number% (from|of|in) %path%
[all] [the] lines (from|of|in) %path%
set line 1 of file "eula.txt" to "eula=true"

Получить родительскую директорию файла

Может быть изменено с использованием SET

parent of %path%
%path%'s parent
set {_file} to parent of file "eula.txt"

Размер файла в байтах

size of %path%
%path%'s size

Последняя дата доступа к файлу

last access time of %path%
%path%'s last access time

Последняя дата редактирования файла

last modified time of %path%
%path%'s last modified time

Дата создания файла

creation time of %path%
%path%'s creation time

Расширение файла

extension of %path%
%path%'s extension

Дисковая информация

total space of %path%
usable space of %path%