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
Get-ChildItem -Path Registry::HKEY_CLASSES_ROOT\.* -ErrorAction SilentlyContinue | Out-GridView |
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
use reqwest; | |
use serde_json; | |
use std::collections::HashMap; | |
#[tokio::main] | |
async fn main() -> Result<(), Box<dyn std::error::Error>> { | |
// KNOWN RETURN - HashMap | |
const URL2: &str = "https://httpbin.org/ip"; | |
match reqwest::get(URL2).await { |
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
use std::fs; | |
use std::os::windows::fs::MetadataExt; | |
fn main() { | |
const FILE: &str = "./examples/hello.txt"; | |
let metadata = fs::metadata(FILE).unwrap(); | |
println!("{:?}", metadata); | |
// Filetype | |
let file_type = metadata.file_type(); | |
println!("{:?}", file_type); |
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
typedef struct _BY_HANDLE_FILE_INFORMATION { | |
DWORD dwFileAttributes; | |
FILETIME ftCreationTime; | |
FILETIME ftLastAccessTime; | |
FILETIME ftLastWriteTime; | |
DWORD dwVolumeSerialNumber; | |
DWORD nFileSizeHigh; | |
DWORD nFileSizeLow; | |
DWORD nNumberOfLinks; | |
DWORD nFileIndexHigh; |
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
use std::fs; | |
use std::os::linux::fs::MetadataExt; | |
fn main() { | |
const FILE: &str = "./examples/hello.txt"; | |
let metadata = fs::metadata(FILE).unwrap(); | |
// Filetype | |
let file_type = metadata.file_type(); | |
println!("{:?}", file_type); | |
// is_dir() |
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
let unix_num_of_blocks_value = metadata.blocks(); |
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
let unix_blksize_value = metadata.blksize(); |
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
let unix_ctime_nsec_value = metadata.ctime_nsec(); |
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
let unix_ctime_value = metadata.ctime(); |
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
let unix_mtime_nsec_value = metadata.mtime_nsec(); |
NewerOlder