How to use the webdav/File.COMPARATOR function in webdav

To help you get started, we’ve selected a few webdav examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github avantgardnerio / js-upload-manager / src / main / webapp / src / webdav / WebDavClient.js View on Github external
var file = new File(response, rootPath);
                if(file.getContentType() === File.TYPE.DIRECTORY) {
                    folders[file.getPath()] = file;
                }
                files.addItem(file);
            });

            // Artificially add the parent folder
            var parentPath = PathUtil.getParentPath(self.getCurrentPath());
            var parentFolder = folders[parentPath];
            if(parentFolder) {
                files.addItem(parentFolder);
            }

            // Sort
            files.sort(File.COMPARATOR);

            return files;
        };

webdav

WebDAV client for NodeJS

MIT
Latest version published 4 days ago

Package Health Score

80 / 100
Full package analysis