-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(lsTypes): Separate the
lsTypes
enum to other module
This pull request introduces changes to improve the organization of the codebase by separating the `lsTypes` enumeration to other module. Signed-off-by: Ryuu Mitsuki <dhefam31@gmail.com>
- Loading branch information
Showing
4 changed files
with
56 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
/** | ||
* Main entry of `lsfnd` package. | ||
* | ||
* Copyright (c) 2024 Ryuu Mitsuki. All rights reserved. | ||
* | ||
* @author Ryuu Mitsuki (https://github.com/mitsuki31) | ||
* @since 0.1.0 | ||
* @license MIT | ||
*/ | ||
|
||
export * from './lsTypes'; | ||
export * from './lsfnd'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* A module contains only a {@link lsTypes} enum, which is used by {@link !lsfnd~ls ls} | ||
* function to specify type of the returned results. | ||
* | ||
* Copyright (c) 2024 Ryuu Mitsuki. All rights reserved. | ||
* | ||
* @module lsTypes | ||
* @author Ryuu Mitsuki (https://github.com/mitsuki31) | ||
* @since 0.1.0 | ||
* @license MIT | ||
* @see {@link lsTypes} | ||
*/ | ||
|
||
/** | ||
* This enumeration defines the different types of listings supported by | ||
* the {@link !lsfnd~ls ls} function. It specifies which file system entries should be | ||
* included in the results. | ||
* | ||
* @readonly | ||
* @public | ||
* @since 0.1.0 | ||
* @see {@link !lsfnd~ls ls} | ||
*/ | ||
export enum lsTypes { | ||
/** | ||
* This option lists both regular files and directories in the output. | ||
* You can also use other number types for alias, like: | ||
* ```ts | ||
* LS_A: 0b01 | 0o01 | 0x01 // Each equivalent to 1 | ||
* ``` | ||
*/ | ||
LS_A = 0b01 << 0b00, // ALL | ||
/** | ||
* This option filters the output to include only directory entries. | ||
* You can also use other number types for alias, like: | ||
* ```ts | ||
* LS_D: 0b10 | 0o02 | 0x02 // Each equivalent to 2 | ||
* ``` | ||
*/ | ||
LS_D = 0b01 << 0b01, // DIRECTORY | ||
/** | ||
* This option filters the output to include only regular files (non-directories). | ||
* You can also use other number types for alias, like: | ||
* ```ts | ||
* LS_F: 0b100 | 0o04 | 0x04 // Each equivalent to 4 | ||
* ``` | ||
*/ | ||
LS_F = 0b01 << 0b10 // FILE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters