Struct FileNameIsOwned

Source
pub struct FileNameIsOwned<const OWNED: bool>(/* private fields */);
Expand description

wxFileName encapsulates a file name.

Implementations§

Source§

impl<const OWNED: bool> FileNameIsOwned<OWNED>

Source

pub fn new() -> FileNameIsOwned<OWNED>

Source

pub fn new_with_filename<F: FileNameMethods>( filename: &F, ) -> FileNameIsOwned<OWNED>

Source

pub fn none() -> Option<&'static Self>

Trait Implementations§

Source§

impl Clone for FileNameIsOwned<false>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const OWNED: bool> Drop for FileNameIsOwned<OWNED>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<const OWNED: bool> FileNameMethods for FileNameIsOwned<OWNED>

Source§

fn append_dir(&self, dir: &str) -> bool

Appends a directory component to the path. Read more
Source§

fn assign<F: FileNameMethods>(&self, filepath: &F)

Creates the file name from another filename object. Read more
Source§

fn assign_cwd(&self, volume: &str)

Makes this object refer to the current working directory on the specified volume (or current volume if volume is empty). Read more
Source§

fn assign_home_dir(&self)

Sets this file name object to the home directory. Read more
Source§

fn assign_temp_file_name(&self, prefix: &str)

The function calls CreateTempFileName() to create a temporary file and sets this object to the name of the file. Read more
Source§

fn assign_temp_file_name_file(&self, prefix: &str, file_temp: *mut c_void)

The function calls CreateTempFileName() to create a temporary file name and open fileTemp with it. Read more
Source§

fn assign_temp_file_name_ffile(&self, prefix: &str, file_temp: *mut c_void)

The function calls CreateTempFileName() to create a temporary file name and open fileTemp with it. Read more
Source§

fn clear(&self)

Reset all components to default, uninitialized state. Read more
Source§

fn clear_ext(&self)

Removes the extension from the file name resulting in a file name with no trailing dot. Read more
Source§

fn dir_exists(&self) -> bool

Returns true if the directory with this name exists. Read more
Turns off symlink dereferencing. Read more
Source§

fn exists_int(&self, flags: c_int) -> bool

Calls the static overload of this function with the full path of this object. Read more
Source§

fn file_exists(&self) -> bool

Returns true if the file with this name exists. Read more
Source§

fn get_dir_count(&self) -> usize

Returns the number of directories in the file name. Read more
Source§

fn get_dirs(&self) -> ArrayStringIsOwned<false>

Returns the directories in string array form. Read more
Source§

fn get_ext(&self) -> String

Returns the file name extension. Read more
Source§

fn get_full_name(&self) -> String

Returns the full name (including extension but excluding directories). Read more
Source§

fn get_long_path(&self) -> String

Return the long form of the path (returns identity on non-Windows platforms). Read more
Source§

fn get_modification_time(&self) -> DateTime

Returns the last time the file was last modified. Read more
Source§

fn get_name(&self) -> String

Returns the name part of the filename (without extension). Read more
Source§

fn get_short_path(&self) -> String

Return the short form of the path (returns identity on non-Windows platforms). Read more
Source§

fn get_times<D: DateTimeMethods, D2: DateTimeMethods, D3: DateTimeMethods>( &self, dt_access: Option<&D>, dt_mod: Option<&D2>, dt_create: Option<&D3>, ) -> bool

Returns the last access, last modification and creation times. Read more
Source§

fn get_volume(&self) -> String

Returns the string containing the volume for this file name. Read more
Source§

fn has_ext(&self) -> bool

Returns true if an extension is present. Read more
Source§

fn has_name(&self) -> bool

Returns true if a name is present. Read more
Source§

fn has_volume(&self) -> bool

Returns true if a volume specifier is present. Read more
Source§

fn insert_dir(&self, before: usize, dir: &str) -> bool

Inserts a directory component before the zero-based position in the directory list. Read more
Source§

fn is_dir(&self) -> bool

Returns true if this object represents a directory, false otherwise (i.e. Read more
Source§

fn is_dir_readable(&self) -> bool

Returns true if the directory component of this instance is an existing directory and this process has read permissions on it. Read more
Source§

fn is_dir_writable(&self) -> bool

Returns true if the directory component of this instance is an existing directory and this process has write permissions on it. Read more
Source§

fn is_file_executable(&self) -> bool

Returns true if a file with this name exists and if this process has execute permissions on it. Read more
Source§

fn is_file_readable(&self) -> bool

Returns true if a file with this name exists and if this process has read permissions on it. Read more
Source§

fn is_file_writable(&self) -> bool

Returns true if a file with this name exists and if this process has write permissions on it. Read more
Source§

fn is_ok(&self) -> bool

Returns true if the filename is valid, false if it is not initialized yet. Read more
Source§

fn mkdir_int(&self, perm: c_int, flags: c_int) -> bool

Creates a directory. Read more
Source§

fn prepend_dir(&self, dir: &str)

Prepends a directory to the file path. Read more
Source§

fn remove_dir(&self, pos: usize)

Removes the specified directory component from the path. Read more
Source§

fn remove_last_dir(&self)

Removes last directory component from the path. Read more
Find the absolute path of the file/directory that is pointed to by this path. Read more
Source§

fn rmdir_int(&self, flags: c_int) -> bool

Deletes the specified directory from the file system. Read more
Source§

fn set_cwd(&self) -> bool

Changes the current working directory. Read more
Source§

fn set_empty_ext(&self)

Sets the extension of the file name to be an empty extension. Read more
Source§

fn set_ext(&self, ext: &str)

Sets the extension of the file name. Read more
Source§

fn set_full_name(&self, fullname: &str)

The full name is the file name and extension (but without the path). Read more
Source§

fn set_name(&self, name: &str)

Sets the name part (without extension). Read more
Source§

fn set_permissions(&self, permissions: c_int) -> bool

Sets permissions for this file or directory. Read more
Source§

fn set_times<D: DateTimeMethods, D2: DateTimeMethods, D3: DateTimeMethods>( &self, dt_access: Option<&D>, dt_mod: Option<&D2>, dt_create: Option<&D3>, ) -> bool

Sets the file creation and last access/modification times (any of the pointers may be NULL). Read more
Source§

fn set_volume(&self, volume: &str)

Sets the volume specifier. Read more
Return whether some operations will follow symlink. Read more
Source§

fn touch(&self) -> bool

Sets the access and modification times to the current moment. Read more
Source§

fn create_temp_file_name_file(prefix: &str, file_temp: *mut c_void) -> String

Returns a temporary file name starting with the given prefix. Read more
Source§

fn create_temp_file_name_ffile(prefix: &str, file_temp: *mut c_void) -> String

This is the same as CreateTempFileName(const wxString &prefix, wxFile *fileTemp) but takes a wxFFile parameter instead of wxFile. Read more
Source§

fn dir_exists_str(dir: &str) -> bool

Returns true if the directory with name dir exists. Read more
Source§

fn exists_str(path: &str, flags: c_int) -> bool

Returns true if either a file or a directory or something else with this name exists in the file system. Read more
Source§

fn file_exists_str(file: &str) -> bool

Returns true if the file with name file exists. Read more
Source§

fn get_cwd(volume: &str) -> String

Retrieves the value of the current working directory on the specified volume. Read more
Source§

fn get_home_dir() -> String

Returns the home directory. Read more
Source§

fn get_temp_dir() -> String

Returns the directory used for temporary files, for current user. Read more
Source§

fn is_dir_readable_str(dir: &str) -> bool

Returns true if the given dir is an existing directory and this process has read permissions on it. Read more
Source§

fn is_dir_writable_str(dir: &str) -> bool

Returns true if the given dir is an existing directory and this process has write permissions on it. Read more
Source§

fn is_file_executable_str(file: &str) -> bool

Returns true if a file with this name exists and if this process has execute permissions on it. Read more
Source§

fn is_file_readable_str(file: &str) -> bool

Returns true if a file with this name exists and if this process has read permissions on it. Read more
Source§

fn is_file_writable_str(file: &str) -> bool

Returns true if a file with this name exists and if this process has write permissions on it. Read more
Source§

fn mkdir_str(dir: &str, perm: c_int, flags: c_int) -> bool

Creates a directory. Read more
Source§

fn rmdir_str(dir: &str, flags: c_int) -> bool

Deletes the specified directory from the file system. Read more
Source§

fn set_cwd_str(cwd: &str) -> bool

Changes the current working directory. Read more
Source§

fn url_to_file_name(url: &str) -> FileName

Converts URL into a well-formed filename. Read more
Source§

fn file_name_to_url<F: FileNameMethods>(filename: &F) -> String

Converts wxFileName into an URL. Read more
Source§

fn strip_extension(fullname: &str) -> String

Strip the file extension. Read more
Source§

impl<const OWNED: bool> WxRustMethods for FileNameIsOwned<OWNED>

Source§

type Unowned = FileNameIsOwned<false>

Source§

unsafe fn as_ptr(&self) -> *mut c_void

Source§

unsafe fn from_ptr(ptr: *mut c_void) -> Self

Source§

unsafe fn from_unowned_ptr(ptr: *mut c_void) -> Self::Unowned

Source§

unsafe fn with_ptr<F: Fn(&Self)>(ptr: *mut c_void, closure: F)

Source§

unsafe fn option_from(ptr: *mut c_void) -> Option<Self::Unowned>
where Self: Sized,

Auto Trait Implementations§

§

impl<const OWNED: bool> Freeze for FileNameIsOwned<OWNED>

§

impl<const OWNED: bool> RefUnwindSafe for FileNameIsOwned<OWNED>

§

impl<const OWNED: bool> !Send for FileNameIsOwned<OWNED>

§

impl<const OWNED: bool> !Sync for FileNameIsOwned<OWNED>

§

impl<const OWNED: bool> Unpin for FileNameIsOwned<OWNED>

§

impl<const OWNED: bool> UnwindSafe for FileNameIsOwned<OWNED>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.