@@ -23,6 +23,7 @@ import com.quarkdown.core.function.value.data.Range
2323import com.quarkdown.core.function.value.data.subList
2424import com.quarkdown.core.function.value.factory.ValueFactory
2525import com.quarkdown.core.function.value.wrappedAsValue
26+ import com.quarkdown.core.permissions.Permission
2627import com.quarkdown.core.permissions.requireReadPermission
2728import com.quarkdown.core.util.normalizeLineSeparators
2829import com.quarkdown.stdlib.internal.AlphanumericComparator
@@ -71,6 +72,8 @@ internal fun file(
7172 * @param lineRange range of lines to extract from the file.
7273 * If not specified or infinite, the whole file is read
7374 * @return a string value of the text extracted from the file
75+ * @permission [Permission.ProjectRead] to read files located in the project directory
76+ * @permission [Permission.GlobalRead] to read files located outside the project directory
7477 * @throws IllegalArgumentException if [lineRange] is out of bounds
7578 * @wiki File data
7679 */
@@ -196,6 +199,8 @@ enum class FileSorting(
196199 * @param order order to sort the files in
197200 * @return an unordered collection of string values, each representing a file located in the directory, with extension
198201 * @throws IllegalArgumentException if the directory does not exist or if the path is not a directory
202+ * @permission [Permission.ProjectRead] to list files located in the project directory
203+ * @permission [Permission.GlobalRead] to list files located outside the project directory
199204 * @see fileName to exclude the extension from file names
200205 * @wiki File data
201206 */
@@ -239,6 +244,8 @@ fun listFiles(
239244 * @param includeExtension whether to include the file extension in the name
240245 * @return the name of the file located in [path]
241246 * @throws IllegalArgumentException if the file does not exist
247+ * @permission [Permission.ProjectRead] to access files located in the project directory
248+ * @permission [Permission.GlobalRead] to access files located outside the project directory
242249 * @wiki File data
243250 */
244251@Name(" filename" )
@@ -273,6 +280,8 @@ enum class CsvParsingMode(
273280 * @param caption optional caption of the table. If set, the table will be numbered according to the current [numbering] format
274281 * @param referenceId optional ID for cross-referencing via [reference]
275282 * @return a table whose content is loaded from the file located in [path]
283+ * @permission [Permission.ProjectRead] to read CSV files located in the project directory
284+ * @permission [Permission.GlobalRead] to read CSV files located outside the project directory
276285 * @wiki File data
277286 */
278287fun csv (
0 commit comments