[−][src]Struct parselnk::Lnk
Represents a windows .lnk file
Fields
header: ShellLinkHeader
The ShellLinkHeader structure contains identification information, timestamps, and flags that specify the presence of optional structures, including LinkTargetIDList (section 2.2), LinkInfo (section 2.3), and StringData (section 2.4).
string_data: StringData
StringData refers to a set of structures that convey user interface and path identification information. The presence of these optional structures is controlled by LinkFlags (section 2.1.1) in the ShellLinkHeader (section 2.1).
link_target_id_list: LinkTargetIdList
The LinkTargetIDList structure specifies the target of the link. The presence of this optional structure is specified by the HasLinkTargetIDList bit (LinkFlags section 2.1.1) in the ShellLinkHeader (section 2.1).
link_info: LinkInfo
The LinkInfo structure specifies information necessary to resolve a link target if it is not found in its original location. This includes information about the volume that the target was stored on, the mapped drive letter, and a Universal Naming Convention (UNC) form of the path if one existed when the link was created. For more details about UNC paths, see [MS-DFSNM] section 2.2.1.4.:w
extra_data: ExtraData
ExtraData refers to a set of structures that convey additional information about a link target. These optional structures can be present in an extra data section that is appended to the basic Shell Link Binary File Format.
Methods
impl Lnk
[src]
pub fn new<S: Read>(reader: &mut S) -> Result<Lnk>
[src]
Creates a new Lnk
from a Read
source.
Example
use parselnk::Lnk; use std::fs::File; let mut file = File::open(r"c:\users\me\desktop\firefox.lnk").unwrap(); let lnk = Lnk::new(&mut file);
pub fn arguments(&self) -> Option<String>
[src]
The command line arguments supplied via the Lnk
pub fn relative_path(&self) -> Option<PathBuf>
[src]
The relative path to the resource of the `Lnk``
pub fn working_dir(&self) -> Option<PathBuf>
[src]
The working directory of the Lnk
pub fn description(&self) -> Option<String>
[src]
The description of the Lnk
pub fn creation_time(&self) -> u64
[src]
The creation FileTime
as a u64
pub fn access_time(&self) -> u64
[src]
The access FileTime
as a u64
pub fn write_time(&self) -> u64
[src]
The write FileTime
as a u64
pub fn created_on(&self) -> Option<DateTime<Utc>>
[src]
The creation FileTime
as a DateTime
pub fn accessed_on(&self) -> Option<DateTime<Utc>>
[src]
The access FileTime
as a DateTime
pub fn modified_on(&self) -> Option<DateTime<Utc>>
[src]
The write FileTime
as a DateTime
Trait Implementations
impl Clone for Lnk
[src]
impl Debug for Lnk
[src]
impl<'_> TryFrom<&'_ [u8]> for Lnk
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(p: &[u8]) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Path> for Lnk
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(p: &Path) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Vec<u8>> for Lnk
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(p: &Vec<u8>) -> Result<Self, Self::Error>
[src]
impl TryFrom<Vec<u8>> for Lnk
[src]
Auto Trait Implementations
impl RefUnwindSafe for Lnk
impl Send for Lnk
impl Sync for Lnk
impl Unpin for Lnk
impl UnwindSafe for Lnk
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,