-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added function in rs bindings to that it will be available in the node bindings on frontend.
- Loading branch information
1 parent
df5a992
commit 59df6db
Showing
6 changed files
with
65 additions
and
0 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
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
13 changes: 13 additions & 0 deletions
13
application/apps/indexer/session/src/unbound/commands/file.rs
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,13 @@ | ||
use super::{CommandOutcome, CommandOutcome::Finished}; | ||
use crate::events::{ComputationError, ComputationError::OperationNotSupported}; | ||
use std::path::Path; | ||
use file_tools::is_binary; | ||
|
||
pub fn is_file_binary( | ||
file_path: &Path | ||
) -> Result<CommandOutcome<bool>, ComputationError> { | ||
match is_binary(file_path) { | ||
Ok(is_binary) => Ok(Finished(is_binary)), | ||
Err(err) => Err(OperationNotSupported(err.to_string())) | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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