listDiskFolder.hidden

Massimo Melina committed Jun 2, 2026 at 17:17 UTC f2009f4ecc6021f6abcc3b975e461d9fb7537c68
4 files changed +7 -6
admin/src/FileForm.ts
+1 -1
@@ -10,7 +10,7 @@ import { apiCall, UseApi, useApiEx } from './api'
10 import {
11 basename, defaultPerms, formatBytes, formatTimestamp, isWhoObject, newDialog, useRequestRender, try_, pathEncode,
12 onlyTruthy, prefix, VfsPerms, wantArray, WhoVfs, WhoObject, matches, xlate, md, Callback, copyTextToClipboard,
13 - normalizeHost, splitAt, IMAGE_FILEMASK, CFG, MASK_IN_TESTS, WHO_ANY_ACCOUNT, WHO_ADMIN, WHO_NO_ONE, WHO_ANYONE,
13 + splitAt, IMAGE_FILEMASK, CFG, MASK_IN_TESTS, WHO_ANY_ACCOUNT, WHO_ADMIN, WHO_NO_ONE, WHO_ANYONE,
14 } from './misc'
15 import { isModifiedConfig } from './AccountForm'
16 import { Btn, Flex, IconBtn, LinkBtn, propsForModifiedValues, useBreakpoint, wikiLink } from './mui'
dev-plugins.md
+3 -2
@@ -827,7 +827,7 @@ This section is still partially documented, and you may need to have a look at t
827 - `icon?: string | true` icon override or true for "specific for this file".
828 - `order?: number` custom sort order.
829 - `listDiskFolder` called when a list is read from the disk; useful to implement a cache
830 - - parameters: { path, ctx? }
830 + - parameters: { path, ctx?, hidden }
831 - async supported
832 - return: to prevent the default listing and provide such a list yourself, return an array or iterator;
833 to let the default behavior while getting the content of the list, return a function, and it will be called for each
@@ -1204,4 +1204,5 @@ If you want to override a text regardless of the language, use the special langu
1204 - HFS.pathSeparator
1205 - config.type=show_html
1206 - 13.1 (v3.2.0)
1207 - - backend events: logRotated
\ No newline at end of file
1207 + - backend events: logRotated
1208 + - listDiskFolder gets "hidden" parameter
src/const.ts
+2 -2
@@ -9,7 +9,7 @@ import { formatTimestamp } from './cross'
9 import { argv } from './argv'
10 export * from './cross-const'
11
12 -export const API_VERSION = 13
12 +export const API_VERSION = 13.1
13 export const COMPATIBLE_API_VERSION = 1 // the day we break with the past, we'll update this
14
15 // you can add arguments with this file, currently used for the update process on mac/linux.
@@ -91,4 +91,4 @@ function useHomeDir() {
91 }
92 catch { return true }
93 }
94 -}
\ No newline at end of file
94 +}
src/walkDir.ts
+1 -1
@@ -43,7 +43,7 @@ export function walkDir(path: string, { depth = 0, hidden = true, parallelizeRec
43 let n = 0
44 let last: DirStreamEntry | undefined
45
46 - const res = (await events.emitAsync('listDiskFolder', { path: base, ctx }))?.[0] // consider only first result
46 + const res = (await events.emitAsync('listDiskFolder', { path: base, ctx, hidden }))?.[0] // consider only first result
47 const pluginReceiver = _.isFunction(res) && res || null
48 const pluginIterator = _.isFunction(res?.[Symbol.asyncIterator] || res?.[Symbol.iterator]) && res as Dir
49