exists

Type:Function
Status:stable
Since:1.0.0
Platform:node
@blackbyte.sugar.node.fs

This function simply check if the path passed exists. You can specify what you want to take care of using the settings object

Params

  1. path*-String

    The path you want to check

  2. settings{}TExistsSettings

    Some settings for what you want to take care of

Return

  1. -Boolean

    true if exists, false if not

Example

import { exists } from '@blackbyte/sugar/fs';
 exists('/something/cool.txt'); // => true

Settings

  1. directorytrueBoolean

    Specify if you want to take care of directories

  2. filetrueBoolean

    Specify if you want to take care of files

  3. symlinktrueBoolean

    Specify if you want to take care of symlinks