pub struct FileNameIsOwned<const OWNED: bool>(/* private fields */);
Expand description
wxFileName encapsulates a file name.
FileName
represents a C++wxFileName
class instance which your code has ownership,FileNameIsOwned
<false>
represents one which don’t own.- Use
FileName
’snew()
to create an instance of this class. - See C++
wxFileName
class’s documentation for more details.
Implementations§
Source§impl<const OWNED: bool> FileNameIsOwned<OWNED>
impl<const OWNED: bool> FileNameIsOwned<OWNED>
Sourcepub fn new() -> FileNameIsOwned<OWNED>
pub fn new() -> FileNameIsOwned<OWNED>
Default constructor.
Sourcepub fn new_with_filename<F: FileNameMethods>(
filename: &F,
) -> FileNameIsOwned<OWNED>
pub fn new_with_filename<F: FileNameMethods>( filename: &F, ) -> FileNameIsOwned<OWNED>
Copy constructor.
pub fn none() -> Option<&'static Self>
Trait Implementations§
Source§impl Clone for FileNameIsOwned<false>
impl Clone for FileNameIsOwned<false>
Source§impl<const OWNED: bool> Drop for FileNameIsOwned<OWNED>
impl<const OWNED: bool> Drop for FileNameIsOwned<OWNED>
Source§impl<const OWNED: bool> FileNameMethods for FileNameIsOwned<OWNED>
impl<const OWNED: bool> FileNameMethods for FileNameIsOwned<OWNED>
Source§fn assign<F: FileNameMethods>(&self, filepath: &F)
fn assign<F: FileNameMethods>(&self, filepath: &F)
Creates the file name from another filename object. Read more
Source§fn assign_cwd(&self, volume: &str)
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)
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)
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)
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)
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_ext(&self)
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
fn dir_exists(&self) -> bool
Returns true if the directory with this name exists. Read more
Source§fn dont_follow_link(&self)
fn dont_follow_link(&self)
Turns off symlink dereferencing. Read more
Source§fn exists_int(&self, flags: c_int) -> bool
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
fn file_exists(&self) -> bool
Returns true if the file with this name exists. Read more
Source§fn get_dir_count(&self) -> usize
fn get_dir_count(&self) -> usize
Returns the number of directories in the file name. Read more
Source§fn get_dirs(&self) -> ArrayStringIsOwned<false>
fn get_dirs(&self) -> ArrayStringIsOwned<false>
Returns the directories in string array form. Read more
Source§fn get_full_name(&self) -> String
fn get_full_name(&self) -> String
Returns the full name (including extension but excluding directories). Read more
Source§fn get_long_path(&self) -> String
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
fn get_modification_time(&self) -> DateTime
Returns the last time the file was last modified. Read more
Source§fn get_name(&self) -> String
fn get_name(&self) -> String
Returns the name part of the filename (without extension). Read more
Source§fn get_short_path(&self) -> String
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
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
fn get_volume(&self) -> String
Returns the string containing the volume for this file name. Read more
Source§fn has_volume(&self) -> bool
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
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
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
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
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
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
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
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
fn is_ok(&self) -> bool
Returns true if the filename is valid, false if it is not initialized yet. Read more
Source§fn prepend_dir(&self, dir: &str)
fn prepend_dir(&self, dir: &str)
Prepends a directory to the file path. Read more
Source§fn remove_dir(&self, pos: usize)
fn remove_dir(&self, pos: usize)
Removes the specified directory component from the path. Read more
Source§fn remove_last_dir(&self)
fn remove_last_dir(&self)
Removes last directory component from the path. Read more
Source§fn resolve_link(&self) -> FileName
fn resolve_link(&self) -> FileName
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
fn rmdir_int(&self, flags: c_int) -> bool
Deletes the specified directory from the file system. Read more
Source§fn set_empty_ext(&self)
fn set_empty_ext(&self)
Sets the extension of the file name to be an empty extension. Read more
Source§fn set_full_name(&self, fullname: &str)
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_permissions(&self, permissions: c_int) -> bool
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
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)
fn set_volume(&self, volume: &str)
Sets the volume specifier. Read more
Source§fn should_follow_link(&self) -> bool
fn should_follow_link(&self) -> bool
Return whether some operations will follow symlink. Read more
Source§fn touch(&self) -> bool
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
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
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
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
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
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
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
fn get_home_dir() -> String
Returns the home directory. Read more
Source§fn get_temp_dir() -> String
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
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
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
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
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
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 rmdir_str(dir: &str, flags: c_int) -> bool
fn rmdir_str(dir: &str, flags: c_int) -> bool
Deletes the specified directory from the file system. Read more
Source§fn url_to_file_name(url: &str) -> FileName
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
fn file_name_to_url<F: FileNameMethods>(filename: &F) -> String
Converts wxFileName into an URL. Read more
Source§impl<const OWNED: bool> WxRustMethods for FileNameIsOwned<OWNED>
impl<const OWNED: bool> WxRustMethods for FileNameIsOwned<OWNED>
type Unowned = FileNameIsOwned<false>
unsafe fn as_ptr(&self) -> *mut c_void
unsafe fn from_ptr(ptr: *mut c_void) -> Self
unsafe fn from_unowned_ptr(ptr: *mut c_void) -> Self::Unowned
unsafe fn with_ptr<F: Fn(&Self)>(ptr: *mut c_void, closure: F)
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more