MCPcopy
hub / github.com/less/less.js / getFileManager

Method getFileManager

packages/less/lib/less/environment/environment.js:28–48  ·  view source on GitHub ↗
(filename, currentDirectory, options, environment, isSync)

Source from the content-addressed store, hash-verified

26 }
27
28 getFileManager(filename, currentDirectory, options, environment, isSync) {
29
30 if (!filename) {
31 logger.warn('getFileManager called with no filename.. Please report this issue. continuing.');
32 }
33 if (currentDirectory === undefined) {
34 logger.warn('getFileManager called with null directory.. Please report this issue. continuing.');
35 }
36
37 let fileManagers = this.fileManagers;
38 if (options.pluginManager) {
39 fileManagers = [].concat(fileManagers).concat(options.pluginManager.getFileManagers());
40 }
41 for (let i = fileManagers.length - 1; i >= 0 ; i--) {
42 const fileManager = fileManagers[i];
43 if (fileManager[isSync ? 'supportsSync' : 'supports'](filename, currentDirectory, options, environment)) {
44 return fileManager;
45 }
46 }
47 return null;
48 }
49
50 addFileManager(fileManager) {
51 this.fileManagers.push(fileManager);

Callers 3

imageSizeFunction · 0.80
pushMethod · 0.80
data-uri.jsFile · 0.80

Calls 1

getFileManagersMethod · 0.80

Tested by

no test coverage detected