@@ -1309,6 +1309,9 @@ module Http =
1309
1309
/// Responses to this method are not cacheable.
1310
1310
val OPTIONS : WebPart
1311
1311
1312
+ /// The files module can be used to serve from the file system. It encapsulates
1313
+ /// common patterns like verifying that back-symlinks or keywords aren't used
1314
+ /// to gain access outside the intended folder.
1312
1315
module Files =
1313
1316
1314
1317
/// <summary><para>
@@ -1318,60 +1321,63 @@ module Http =
1318
1321
/// </para></summary>
1319
1322
/// <remarks>
1320
1323
/// </remarks>
1321
- val send_file : filename : string -> compression : bool -> WebPart
1324
+ val send_file : file_name : string -> compression : bool -> WebPart
1322
1325
1323
1326
/// <summary><para>
1324
1327
/// Send the file by the filename given. Will search relative to the current directory for
1325
1328
/// the file path, unless you pass it a file with a slash at the start of its name, in which
1326
1329
/// case it will search the root of the file system that is hosting the current directory.
1327
1330
/// Will also set the MIME type based on the file extension.
1328
- /// </para><para>
1329
- /// </para><para>
1330
1331
/// </para></summary>
1331
1332
/// <remarks>
1332
1333
/// </remarks>
1333
- val file : filename : string -> WebPart
1334
+ val file : file_name : string -> WebPart
1334
1335
1335
1336
/// <summary><para>
1336
1337
/// Format a string with a local file path given a file name 'fileName'. You should
1337
1338
/// use this helper method to find the current directory and concatenate that current
1338
1339
/// directory to the filename which should be absolute and start with a path separator.
1339
- /// </para><para>
1340
- /// </para><para>
1341
1340
/// </para></summary>
1342
1341
/// <remarks>
1342
+ /// The current implementation doesn't take kindly to relative paths.
1343
1343
/// </remarks>
1344
- val local_file : fileName : string -> rootDir : string -> string
1344
+ val local_file : file_name : string -> root_path : string -> string
1345
1345
1346
1346
/// <summary><para>
1347
1347
/// 'browse' the file given as the filename, by sending it to the browser with a
1348
1348
/// MIME-type/Content-Type header based on its extension. Will service from the
1349
1349
/// current directory.
1350
- /// </para><para>
1351
- /// </para><para>
1352
1350
/// </para></summary>
1353
- /// <remarks>
1354
- /// </remarks>
1355
- val browse_file : filename : string -> WebPart
1351
+ val browse_file : file_name : string -> WebPart
1356
1352
1357
1353
/// <summary><para>
1358
1354
/// 'browse' the file in the sense that the contents of the file are sent based on the
1359
- /// request's Url property. Will serve from the current directory.
1360
- /// </para><para>
1361
- /// </para><para>
1355
+ /// request's Url property. Will serve from the passed root path/directory.
1362
1356
/// </para></summary>
1363
1357
/// <remarks>
1358
+ /// The current implementation doesn't take kindly to relative paths.
1364
1359
/// </remarks>
1365
- val browse : WebPart
1360
+ val browse : root_path : string -> WebPart
1366
1361
1367
1362
/// <summary><para>
1368
- /// Serve a 'file browser' for a directory
1369
- /// </para><para>
1370
- /// </para><para>
1363
+ /// 'browse' the file in the sense that the contents of the file are sent based on the
1364
+ /// request's Url property. Will serve from the current as configured in directory.
1365
+ /// Suave's runtime.
1366
+ /// </para></summary>
1367
+ val browse ' : WebPart
1368
+
1369
+ /// <summary><para>
1370
+ /// Serve a 'file browser' for a root_path
1371
1371
/// </para></summary>
1372
1372
/// <remarks>
1373
+ /// The current implementation doesn't take kindly to relative paths.
1373
1374
/// </remarks>
1374
- val dir : WebPart
1375
+ val dir : root_path : string -> WebPart
1376
+
1377
+ /// <summary><para>
1378
+ /// Serve a 'file browser' for the current directory
1379
+ /// </para></summary>
1380
+ val dir ' : WebPart
1375
1381
1376
1382
module Embedded =
1377
1383
0 commit comments