Skip to content

Commit e21cb1c

Browse files
feat(eldritch-libfile): Add pwd method and update documentation
Added `pwd` method to `FileLibrary` trait and implementations. - `lib.rs`: Added `pwd` to trait definition. - `std.rs`: Implemented `pwd` using `std::env::current_dir`. - `fake.rs`: Implemented mock `pwd`. - Added unit test for `pwd`. - Updated `eldritch.md` with documentation for `file.pwd`, labeled as `(V2-Only)`.
1 parent 65cf514 commit e21cb1c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/_docs/user-guide/eldritch.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,12 @@ The <b>file.moveto</b> method moves a file or directory from `src` to `dst`. If
455455

456456
The <b>file.parent_dir</b> method returns the parent directory of a give path. Eg `/etc/ssh/sshd_config` -> `/etc/ssh`
457457

458+
### file.pwd (V2-Only)
459+
460+
`file.pwd() -> Option<str>`
461+
462+
The <b>file.pwd</b> method returns the current working directory of the process. If it could not be determined, `None` is returned.
463+
458464
### file.read
459465

460466
`file.read(path: str) -> str`

0 commit comments

Comments
 (0)