EXPRESSIONS

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

По сути, вы получаете либо реальный файл, если он есть, либо абстрактный файл, который потом можно создать

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

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

Абсолютный - то есть тот, у которого путь начинается с корня файловой системы

absolute [(file|dir[ectory])] of %path%
%path%'s absolute [(file|dir[ectory])] 
set {_file} to absolute file of file "eula.txt"

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

Позволяет так же делать это рекурсивно, получая файлы в директории и во всех внутренних директориях

all [the] files and [all] [the] dir[ectorie]s (in|of|from) %path%
all [the] files (in|of|from) %path%
all [the] dir[ectorie]s (in|of|from) %path%
all [the] sub[(-| )]files and [all] [the] sub[(-| )]dir[ectorie]s (in|of|from) %path%
all [the] sub[(-| )]dir[ectorie]s (in|of|from) %path%
all [the] sub[(-| )]files (in|of|from) %path%
glob (files|dir[ectorie]s) %string% (in|of|from) %path%
loop all files from file "plugins/":
  broadcast "%loop-value%"

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

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

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

[the] (file|dir[ectory])name of %path%
[the] %path%'s (file|dir[ectory])name
loop all files from file "plugins/":
  broadcast filename of loop-value

Прочитать строку/строки файла или изменить их

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

Получить директорию в которой находится файл/папка

parent [(file|dir[ectory])] of %path%
%path%'s parent [(file|dir[ectory])]
set {_file} to parent of file "eula.txt"

Получить размер файла в байтах

file size of %path%
%path%'s file size

Получить дату последнего доступа к файлу

[last] access (date|time) of %path%
%path%'s [last] access (date|time)

Получить дату последнего изменения файла

[last] modified (date|time) of %path%
%path%'s [last] modified (date|time)

Получить дату создания файла

create[d] (date|time) of %path%
%path%'s create[d] (date|time)