Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F131527
finder.rs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
677 B
Referenced Files
None
Subscribers
None
finder.rs
View Options
use
ignore
::
WalkBuilder
;
use
std
::
fs
;
pub
struct
Options
{
pub
directory
:
String
,
}
pub
fn
find_files
(
options
:
Options
)
->
Vec
<
String
>
{
let
mut
files
:
Vec
<
String
>
=
Vec
::
new
();
let
base_path
=
&
fs
::
canonicalize
(
options
.
directory
).
unwrap
();
let
mut
builder
=
WalkBuilder
::
new
(
base_path
);
builder
.
ignore
(
true
).
hidden
(
true
);
for
result
in
builder
.
build
()
{
let
absolute_candidate
=
result
.
unwrap
();
let
candidate_path
=
absolute_candidate
.
path
().
strip_prefix
(
base_path
).
unwrap
();
if
candidate_path
.
is_dir
()
{
continue
;
}
files
.
push
(
candidate_path
.
to_str
().
unwrap
().
to_string
());
}
files
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Apr 6 2026, 5:59 PM (5 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16035
Default Alt Text
finder.rs (677 B)
Attached To
Mode
R1 ivy.nvim
Attached
Detach File
Event Timeline
Log In to Comment