{"_id":"@aminya/fs-plus","_rev":"1-8c83a56371a4eb297e1a88586a44a13b","name":"@aminya/fs-plus","dist-tags":{"latest":"3.2.0"},"versions":{"3.2.0":{"name":"@aminya/fs-plus","version":"3.2.0","description":"node's fs with more helpers","main":"./lib/fs-plus.js","repository":{"type":"git","url":"git+https://github.com/atom/fs-plus.git"},"bugs":{"url":"https://github.com/atom/fs-plus/issues"},"homepage":"http://atom.github.io/fs-plus","license":"MIT","keywords":["fs","filesystem"],"devDependencies":{"jasmine-focused":"1.x","temp":"~0.8.1","coffeelint":"^2.1.0","rollup":"^2.18.2","rollup-plugin-atomic":"^1.2.0","@babel/cli":"7.10.3","@babel/core":"7.10.3","babel-preset-atomic":"^1.0.7","shx":"^0.3.2","cross-env":"^7.0.2"},"dependencies":{"async":"^1.5.2","fs-extra":"^9.1.0","mkdirp":"^0.5.1","rimraf":"^2.5.2","underscore-plus":"1.x"},"coffeelintConfig":{"no_empty_param_list":{"level":"error"},"max_line_length":{"level":"ignore"}},"scripts":{"clean":"shx rm -rf lib","test":"jasmine-focused --captureExceptions --coffee spec","babel":"npm run clean && cross-env NODE_ENV=development cross-env BABEL_KEEP_MODULES=false babel src --out-dir lib","dev":"npm run clean && cross-env NODE_ENV=development cross-env BABEL_KEEP_MODULES=true rollup -c -w","build":"npm run clean && cross-env NODE_ENV=production cross-env BABEL_KEEP_MODULES=true rollup -c "},"gitHead":"8ee03b6d0cc25c98707934d12bd5f804588f9586","_id":"@aminya/fs-plus@3.2.0","_nodeVersion":"16.5.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-WXrxD9DuZLnGt1bUCqZgJbXmeA1cy7KMb1hYhxphv1vli+GVIecUojBn+X94W2broyrxyKwg3TCONRTnN8UhZQ==","shasum":"87e2751a05d0ed12fc8885972eadd7771e8470a9","tarball":"https://registry.npmjs.org/@aminya/fs-plus/-/fs-plus-3.2.0.tgz","fileCount":9,"unpackedSize":245690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAitmCRA9TVsSAnZWagAALIsP/1GN3VQK8CS3nZumR8bu\nVpx3Vj4W3/rgTLRn+m1FKxVA17uKCj46T9ExAdwkU25WRYCXC7sCbvUAoWHj\nb942my2en4OFCLwAcqsVTHgGSq4KyGlKXxo9WLyex7PkwFKmXcsvvBVEt98G\nzwL21wW6qIf8FJuUvCkQDSeOibGosSdaibHmbsNQuuEeZIROMfNJNiR661II\nrzgxdFeQUm1Pl+lLMNn2E/pzGG2H06+sP9D5fH6762Cc/lEt3J5J/iqY+5M1\n1IhWAB54N9tdW6Du3LuAfA0Fyhs1nzMA3yTBbz252qPfGHrEVptskyaxXKZr\nYcBnXyQlYXpzbB0Kfvw+d+goSeeBz5JpVult078FXmAYYE3p9o4YnKins/cU\nmq6z38CC0A2dC9gU/iFw2Ja5H4wMhb8mdi21+57hlBWWNIcoUJSMKBBlXglB\nXsOUF1XAcnvAeibW/HPZjNSqsk38F2Z+PqFQcOTdFVljXz1heI8JTKjpWgKS\nCM4Mn2grhZJTs0/dDwilAHAIv1DKZKZ3OfAjKW+qaQ0I/9GuOvIGQUkCrT+s\n0YwWsvJ7Ec1LnMVjo5dBKElNdc5haefh2i1INYuj20Tlw4Dlo7bVysEUlIj4\n/E7/HY1DwPJgxtIf3mhrOgJJ/w5EIQQ5R+RpqRXFkpXuSLGHOoAzo+1tWAK8\nSo+C\r\n=4dJ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIqKucCS2SHTX9JXLfs4bH8JVofzspIKRxite1eFKJrAIgMzA9VZrLFyWzZFfJQqH00GV1UQ/et7Px3D5ZYI/1Yqk="}]},"_npmUser":{"name":"aminya","email":"aminyahyaabadi74@gmail.com"},"directories":{},"maintainers":[{"name":"aminya","email":"aminyahyaabadi74@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-plus_3.2.0_1627532134820_0.277159635868071"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-29T04:15:34.761Z","3.2.0":"2021-07-29T04:15:34.933Z","modified":"2022-04-04T13:49:25.299Z"},"maintainers":[{"name":"aminya","email":"aminyahyaabadi74@gmail.com"}],"description":"node's fs with more helpers","homepage":"http://atom.github.io/fs-plus","keywords":["fs","filesystem"],"repository":{"type":"git","url":"git+https://github.com/atom/fs-plus.git"},"bugs":{"url":"https://github.com/atom/fs-plus/issues"},"license":"MIT","readme":"# fs plus\r\n[![macOS Build Status](https://travis-ci.org/atom/fs-plus.svg?branch=master)](https://travis-ci.org/atom/fs-plus)\r\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/gf2tleqp0hdek3o3/branch/master?svg=true)](https://ci.appveyor.com/project/Atom/fs-plus/branch/master)\r\n[![Dependency Status](https://david-dm.org/atom/fs-plus.svg)](https://david-dm.org/atom/fs-plus)\r\n\r\nYet another filesystem helper based on node's [fs](http://nodejs.org/api/fs.html)\r\nmodule.  This library exports everything from node's fs module but with some\r\nextra helpers.\r\n\r\n## Using\r\n\r\n```sh\r\nnpm install fs-plus\r\n```\r\n\r\n```coffee\r\nfs = require 'fs-plus'\r\n```\r\n\r\n## Documentation\r\n\r\n### `getHomeDirectory()`\r\nReturns the absolute path to the home directory.\r\n\r\n### `absolute(relativePath)`\r\nMake the given path absolute by resolving it against the current\r\nworking directory.\r\n\r\n### Params\r\n\r\n - **String** `relativePath`: The string representing the relative path. If the\r\n   path is prefixed with '~', it will be expanded to the current user's home\r\n   directory.\r\n\r\n### Return\r\n\r\n - **String**: The absolute path or the relative path if it's unable to\r\n   determine its real path.\r\n\r\n### `normalize(pathToNormalize)`\r\nNormalize the given path treating a leading `~` segment as referring to the\r\nhome directory. This method does not query the filesystem.\r\n\r\n#### Params\r\n\r\n - **String** `pathToNormalize`: The string containing the abnormal path. If the\r\n   path is prefixed with '~', it will be expanded to the current user's home\r\n   directory.\r\n\r\n#### Return\r\n - **String** Returns a normalized path.\r\n\r\n### `tildify(pathToTildify)`\r\nConvert an absolute path to tilde path on Linux and macOS:\r\n/Users/username/dev => ~/dev\r\n\r\n#### Params\r\n\r\n - **String** `pathToTildify`: The string containing the full path.\r\n\r\n#### Return\r\n - **String** Returns a tildified path.\r\n\r\n### `getAppDataDirectory()`\r\nGet path to store application specific data.\r\n\r\n#### Return\r\n - **String** Returns the absolute path or null if platform isn't supported\r\n\r\n    - macOS: `~/Library/Application Support/`\r\n    - Windows: `%AppData%`\r\n    - Linux: `/var/lib`\r\n\r\n### `isAbsolute(pathToCheck)`\r\nIs the given path absolute?\r\n\r\n#### Params\r\n - **String** `pathToCheck`: The relative or absolute path to check.\r\n\r\n#### Return\r\n - **Bolean** Returns `true` if the path is absolute, `false` otherwise.\r\n\r\n### `existsSync(pathToCheck)`\r\nReturns `true` if a file or folder at the specified path exists.\r\n\r\n### `isDirectorySync(directoryPath)`\r\nReturns `true` if the given path exists and is a directory.\r\n\r\n### `isDirectory(directoryPath)`\r\nAsynchronously checks that the given path exists and is a directory.\r\n\r\n### `isFileSync(filePath)`\r\nReturns true if the specified path exists and is a file.\r\n\r\n### `isSymbolicLinkSync(symlinkPath)`\r\nReturns `true` if the specified path is a symbolic link.\r\n\r\n### `isSymbolicLink(symlinkPath, callback)`\r\nCalls back with `true` if the specified path is a symbolic link.\r\n\r\n### `isExecutableSync(pathToCheck)`\r\nReturns `true` if the specified path is executable.\r\n\r\n### `getSizeSync(pathToCheck)`\r\nReturns the size of the specified path.\r\n\r\n### `listSync(rootPath, extensions)`\r\nReturns an Array with the paths of the files and directories\r\ncontained within the directory path. It is not recursive.\r\n\r\n## Params\r\n - **String** `rootPath`: The absolute path to the directory to list.\r\n - **Array** `extensions`: An array of extensions to filter the results by. If none are\r\n   given, none are filtered (optional).\r\n\r\n### `list(rootPath, extensions)`\r\nAsynchronously lists the files and directories in the given path. The listing is not recursive.\r\n\r\n### `listTreeSync(rootPath)`\r\nGet all paths under the given path.\r\n\r\n#### Params\r\n - **String** `rootPath` The {String} path to start at.\r\n\r\n#### Return\r\n - **Array** Returns an array of strings under the given path.\r\n\r\n### `moveSync(source, target)`\r\nMoves the file or directory to the target synchronously.\r\n\r\n### `removeSync(pathToRemove)`\r\nRemoves the file or directory at the given path synchronously.\r\n\r\n### `writeFileSync(filePath, content, options)`\r\nOpen, write, flush, and close a file, writing the given content synchronously.\r\nIt also creates the necessary parent directories.\r\n\r\n### `writeFile(filePath, content, options, callback)`\r\nOpen, write, flush, and close a file, writing the given content\r\nasynchronously.\r\nIt also creates the necessary parent directories.\r\n\r\n### `copySync(sourcePath, destinationPath)`\r\nCopies the given path recursively and synchronously.\r\n\r\n### `makeTreeSync(directoryPath)`\r\nCreate a directory at the specified path including any missing\r\nparent directories synchronously.\r\n\r\n### `makeTree(directoryPath, callback)`\r\nCreate a directory at the specified path including any missing\r\nparent directories asynchronously.\r\n\r\n### `traverseTreeSync(rootPath, onFile, onDirectory)`\r\nRecursively walk the given path and execute the given functions\r\nsynchronously.\r\n\r\n#### Params\r\n - **String** `rootPath`: The string containing the directory to recurse into.\r\n - **Function** `onFile`: The function to execute on each file, receives a single argument\r\n   the absolute path.\r\n - **Function** `onDirectory`: The function to execute on each directory, receives a single\r\n   argument the absolute path (defaults to onFile). If this\r\n   function returns a falsy value then the directory is not\r\n   entered.\r\n\r\n### `traverseTree(rootPath, onFile, onDirectory, onDone)`\r\nPublic: Recursively walk the given path and execute the given functions\r\nasynchronously.\r\n\r\n### `md5ForPath(pathToDigest)`\r\nHashes the contents of the given file.\r\n\r\n#### Params\r\n - **String** `pathToDigest`: The string containing the absolute path.\r\n\r\n#### Return\r\n - **String** Returns a string containing the MD5 hexadecimal hash.\r\n\r\n### `resolve(loadPaths, pathToResolve, extensions)`\r\nFinds a relative path among the given array of paths.\r\n\r\n#### Params\r\n - **Array** `loadPaths`: An array of absolute and relative paths to search.\r\n - **String** `pathToResolve` The string containing the path to resolve.\r\n - **Array** `extensions` An array of extensions to pass to {resolveExtensions} in\r\n   which case pathToResolve should not contain an extension\r\n   (optional).\r\n\r\n#### Return\r\nReturns the absolute path of the file to be resolved if it's found and\r\nundefined otherwise.\r\n\r\n### `resolveOnLoadPath()`\r\nLike `.resolve` but uses node's modules paths as the load paths to\r\nsearch.\r\n\r\n### `resolveExtension(pathToResolve, extensions)`\r\nFinds the first file in the given path which matches the extension\r\nin the order given.\r\n\r\n#### Params\r\n - **String** `pathToResolve`: the string containing relative or absolute path of the\r\n   file in question without the extension or '.'.\r\n - **Array** `extensions`: the ordered array of extensions to try.\r\n\r\n#### Return\r\nReturns the absolute path of the file if it exists with any of the given\r\nextensions, otherwise it's undefined.\r\n\r\n### `isCompressedExtension(ext)`\r\nReturns true for extensions associated with compressed files.\r\n\r\n### `isImageExtension(ext)`\r\nReturns true for extensions associated with image files.\r\n\r\n### `isPdfExtension(ext)`\r\nReturns true for extensions associated with pdf files.\r\n\r\n### `isBinaryExtension(ext)`\r\nReturns true for extensions associated with binary files.\r\n\r\n### `isReadmePath(readmePath)`\r\nReturns true for files named similarily to 'README'\r\n\r\n### `isMarkdownExtension(ext)`\r\nReturns true for extensions associated with Markdown files.\r\n\r\n### `isCaseInsensitive()`\r\nIs the filesystem case insensitive?\r\nReturns `true` if case insensitive, `false` otherwise.\r\n\r\n### `isCaseSensitive()`\r\nIs the filesystem case sensitive?\r\nReturns `true` if case sensitive, `false` otherwise.\r\n\r\n### `statSyncNoException(path[, options])`\r\nCalls [`fs.statSync`](https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_statsync_path_options), catching all exceptions raised. This method calls `fs.statSyncNoException` when provided by the underlying `fs` module (Electron < 3.0).\r\nReturns `fs.Stats` if the file exists, `false` otherwise.\r\n\r\n### `lstatSyncNoException(path[, options])`\r\nCalls [`fs.lstatSync`](https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_lstatsync_path_options), catching all exceptions raised. This method calls `fs.lstatSyncNoException` when provided by the underlying `fs` module (Electron < 3.0).\r\nReturns `fs.Stats` if the file exists, `false` otherwise.\r\n","readmeFilename":"README.md"}