@breadstone-infrastructure/utilities 0.0.39 → 0.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,11 +87,11 @@ export declare class FileSystem implements IFileSystem {
87
87
  */
88
88
  exists(filePath: string): boolean;
89
89
  /**
90
- * Checks if a file is cached.
90
+ * Checks if a file or directory exists and returns its type.
91
91
  *
92
92
  * @public
93
93
  * @param filePath - The path to the file.
94
- * @returns A promise resolving to whether the file is cached.
94
+ * @returns 'file' if it is a file, 'directory' if it is a directory, or 'unknown' if it does not exist or is neither.
95
95
  */
96
96
  isFileOrDirectory(inputPath: string): 'file' | 'directory' | 'unknown';
97
97
  /**
@@ -114,11 +114,11 @@ class FileSystem {
114
114
  return File_js_1.File.exists(filePath);
115
115
  }
116
116
  /**
117
- * Checks if a file is cached.
117
+ * Checks if a file or directory exists and returns its type.
118
118
  *
119
119
  * @public
120
120
  * @param filePath - The path to the file.
121
- * @returns A promise resolving to whether the file is cached.
121
+ * @returns 'file' if it is a file, 'directory' if it is a directory, or 'unknown' if it does not exist or is neither.
122
122
  */
123
123
  isFileOrDirectory(inputPath) {
124
124
  const info = new FileSystemInfo_js_1.FileSystemInfo(inputPath);
@@ -82,11 +82,11 @@ export interface IFileSystem {
82
82
  */
83
83
  exists(filePath: string): boolean;
84
84
  /**
85
- * Checks if a directory exists.
85
+ * Checks if a file or directory exists and returns its type.
86
86
  *
87
87
  * @public
88
- * @param dirPath - The path to the directory.
89
- * @returns `true` if the directory exists, or `false` otherwise
88
+ * @param filePath - The path to the file.
89
+ * @returns 'file' if it is a file, 'directory' if it is a directory, or 'unknown' if it does not exist or is neither.
90
90
  */
91
91
  isFileOrDirectory(inputPath: string): 'file' | 'directory' | 'unknown';
92
92
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@breadstone-infrastructure/utilities",
3
3
  "description": "Common utility classes and functions",
4
- "version": "0.0.39",
4
+ "version": "0.0.41",
5
5
  "license": "MIT",
6
6
  "author": "andre.wehlert <awehlert@breadstone.de> (https://www.breadstone.de)",
7
7
  "repository": {