How to use the fswin.getAttributes function in fswin

To help you get started, we’ve selected a few fswin 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 stevenvachon / winattr / lib / binding / index.js View on Github external
const get = (path, callback) =>
{
	fswin.getAttributes(path, result =>
	{
		if (result === null)
		{
			// fswin does not return an error -- problem could be ENOENT,EPERM,etc
			callback( new Error("unknown error") );
			return;
		}

		let attrs = {};

		for (let i in result)
		{
			if (i.startsWith("IS_"))
			{
				attrs[i] = result[i];
			}
github matthew-matvei / freeman / src / common / managers / AttributesManager.ts View on Github external
return new Promise((resolve, reject) => {
            fswin.getAttributes(pathToItem, result => {
                if (!result) {
                    reject(`Could not retrieve attributes for ${pathToItem}`);
                }

                const attributes: IAttributes = {
                    hidden: result!.IS_HIDDEN
                };

                resolve(attributes);
            });
        });
    }

fswin

nodejs fs extensions for windows

MIT
Latest version published 4 months ago

Package Health Score

72 / 100
Full package analysis