Skip to main content

FileIndex

Import :

const FileIndex = brackets.getModule("filesystem/FileIndex")

FileIndex

Kind: global class

fileIndex.clear()

Clear the file index cache.

Kind: instance method of FileIndex

fileIndex.doNotRemoveFromIndex()

Will prevent the file from being removed from index. However, it is reset when index is cleared.

Kind: instance method of FileIndex

fileIndex.visitAll(Called)

Visits every entry in the entire index; no stopping condition.

Kind: instance method of FileIndex

ParamTypeDescription
Calledfunctionwith an entry and its fullPath

fileIndex.addEntry(entry)

Add an entry.

Kind: instance method of FileIndex

ParamTypeDescription
entryFileSystemEntryThe entry to add.

fileIndex.removeEntry(entry)

Remove an entry.

Kind: instance method of FileIndex

ParamTypeDescription
entryFileSystemEntryThe entry to remove.

fileIndex.entryRenamed(oldPath, newPath, isDirectory)

Notify the index that an entry has been renamed. This updates all affected entries in the index.

Kind: instance method of FileIndex

ParamType
oldPathstring
newPathstring
isDirectoryboolean

fileIndex.getEntry(path) ⇒ File | Directory

Returns the cached entry for the specified path, or undefined if the path has not been cached.

Kind: instance method of FileIndex
Returns: File | Directory - The entry for the path, or undefined if it hasn't been cached yet.

ParamTypeDescription
pathstringThe path of the entry to return.

FileUtils

FileIndex is an internal module used by FileSystem to maintain an index of all files and directories.

This module is only used by FileSystem, and should not be called directly.

Kind: global variable