pub trait FileNameMethods: WxRustMethods {
Show 69 methods
// Provided methods
fn append_dir(&self, dir: &str) -> bool { ... }
fn assign<F: FileNameMethods>(&self, filepath: &F) { ... }
fn assign_cwd(&self, volume: &str) { ... }
fn assign_home_dir(&self) { ... }
fn assign_temp_file_name(&self, prefix: &str) { ... }
fn assign_temp_file_name_file(&self, prefix: &str, file_temp: *mut c_void) { ... }
fn assign_temp_file_name_ffile(&self, prefix: &str, file_temp: *mut c_void) { ... }
fn clear(&self) { ... }
fn clear_ext(&self) { ... }
fn dir_exists(&self) -> bool { ... }
fn dont_follow_link(&self) { ... }
fn exists_int(&self, flags: c_int) -> bool { ... }
fn file_exists(&self) -> bool { ... }
fn get_dir_count(&self) -> usize { ... }
fn get_dirs(&self) -> ArrayStringIsOwned<false> { ... }
fn get_ext(&self) -> String { ... }
fn get_full_name(&self) -> String { ... }
fn get_long_path(&self) -> String { ... }
fn get_modification_time(&self) -> DateTime { ... }
fn get_name(&self) -> String { ... }
fn get_short_path(&self) -> String { ... }
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_volume(&self) -> String { ... }
fn has_ext(&self) -> bool { ... }
fn has_name(&self) -> bool { ... }
fn has_volume(&self) -> bool { ... }
fn insert_dir(&self, before: usize, dir: &str) -> bool { ... }
fn is_dir(&self) -> bool { ... }
fn is_dir_readable(&self) -> bool { ... }
fn is_dir_writable(&self) -> bool { ... }
fn is_file_executable(&self) -> bool { ... }
fn is_file_readable(&self) -> bool { ... }
fn is_file_writable(&self) -> bool { ... }
fn is_ok(&self) -> bool { ... }
fn mkdir_int(&self, perm: c_int, flags: c_int) -> bool { ... }
fn prepend_dir(&self, dir: &str) { ... }
fn remove_dir(&self, pos: usize) { ... }
fn remove_last_dir(&self) { ... }
fn resolve_link(&self) -> FileName { ... }
fn rmdir_int(&self, flags: c_int) -> bool { ... }
fn set_cwd(&self) -> bool { ... }
fn set_empty_ext(&self) { ... }
fn set_ext(&self, ext: &str) { ... }
fn set_full_name(&self, fullname: &str) { ... }
fn set_name(&self, name: &str) { ... }
fn set_permissions(&self, permissions: c_int) -> bool { ... }
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_volume(&self, volume: &str) { ... }
fn should_follow_link(&self) -> bool { ... }
fn touch(&self) -> bool { ... }
fn create_temp_file_name_file(
prefix: &str,
file_temp: *mut c_void,
) -> String { ... }
fn create_temp_file_name_ffile(
prefix: &str,
file_temp: *mut c_void,
) -> String { ... }
fn dir_exists_str(dir: &str) -> bool { ... }
fn exists_str(path: &str, flags: c_int) -> bool { ... }
fn file_exists_str(file: &str) -> bool { ... }
fn get_cwd(volume: &str) -> String { ... }
fn get_home_dir() -> String { ... }
fn get_temp_dir() -> String { ... }
fn is_dir_readable_str(dir: &str) -> bool { ... }
fn is_dir_writable_str(dir: &str) -> bool { ... }
fn is_file_executable_str(file: &str) -> bool { ... }
fn is_file_readable_str(file: &str) -> bool { ... }
fn is_file_writable_str(file: &str) -> bool { ... }
fn mkdir_str(dir: &str, perm: c_int, flags: c_int) -> bool { ... }
fn rmdir_str(dir: &str, flags: c_int) -> bool { ... }
fn set_cwd_str(cwd: &str) -> bool { ... }
fn url_to_file_name(url: &str) -> FileName { ... }
fn file_name_to_url<F: FileNameMethods>(filename: &F) -> String { ... }
fn strip_extension(fullname: &str) -> String { ... }
}Expand description
This trait represents C++ wxFileName class’s methods and inheritance.
See FileNameIsOwned documentation for the class usage.
Provided Methods§
Sourcefn append_dir(&self, dir: &str) -> bool
fn append_dir(&self, dir: &str) -> bool
Appends a directory component to the path.
Sourcefn assign<F: FileNameMethods>(&self, filepath: &F)
fn assign<F: FileNameMethods>(&self, filepath: &F)
Creates the file name from another filename object.
Sourcefn 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).
Sourcefn assign_home_dir(&self)
fn assign_home_dir(&self)
Sets this file name object to the home directory.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn clear_ext(&self)
fn clear_ext(&self)
Removes the extension from the file name resulting in a file name with no trailing dot.
Sourcefn dir_exists(&self) -> bool
fn dir_exists(&self) -> bool
Returns true if the directory with this name exists.
Sourcefn dont_follow_link(&self)
fn dont_follow_link(&self)
Turns off symlink dereferencing.
Sourcefn 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.
Sourcefn file_exists(&self) -> bool
fn file_exists(&self) -> bool
Returns true if the file with this name exists.
Sourcefn get_dir_count(&self) -> usize
fn get_dir_count(&self) -> usize
Returns the number of directories in the file name.
Sourcefn get_dirs(&self) -> ArrayStringIsOwned<false>
fn get_dirs(&self) -> ArrayStringIsOwned<false>
Returns the directories in string array form.
Sourcefn get_full_name(&self) -> String
fn get_full_name(&self) -> String
Returns the full name (including extension but excluding directories).
Sourcefn get_long_path(&self) -> String
fn get_long_path(&self) -> String
Return the long form of the path (returns identity on non-Windows platforms).
Sourcefn get_modification_time(&self) -> DateTime
fn get_modification_time(&self) -> DateTime
Returns the last time the file was last modified.
Sourcefn get_short_path(&self) -> String
fn get_short_path(&self) -> String
Return the short form of the path (returns identity on non-Windows platforms).
Sourcefn 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.
Sourcefn get_volume(&self) -> String
fn get_volume(&self) -> String
Returns the string containing the volume for this file name.
Sourcefn has_volume(&self) -> bool
fn has_volume(&self) -> bool
Returns true if a volume specifier is present.
Sourcefn 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.
Sourcefn is_dir(&self) -> bool
fn is_dir(&self) -> bool
Returns true if this object represents a directory, false otherwise (i.e.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn is_ok(&self) -> bool
fn is_ok(&self) -> bool
Returns true if the filename is valid, false if it is not initialized yet.
Sourcefn prepend_dir(&self, dir: &str)
fn prepend_dir(&self, dir: &str)
Prepends a directory to the file path.
Sourcefn remove_dir(&self, pos: usize)
fn remove_dir(&self, pos: usize)
Removes the specified directory component from the path.
Sourcefn remove_last_dir(&self)
fn remove_last_dir(&self)
Removes last directory component from the path.
Sourcefn resolve_link(&self) -> FileName
fn resolve_link(&self) -> FileName
Find the absolute path of the file/directory that is pointed to by this path.
Sourcefn rmdir_int(&self, flags: c_int) -> bool
fn rmdir_int(&self, flags: c_int) -> bool
Deletes the specified directory from the file system.
Sourcefn set_empty_ext(&self)
fn set_empty_ext(&self)
Sets the extension of the file name to be an empty extension.
Sourcefn 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).
Sourcefn set_permissions(&self, permissions: c_int) -> bool
fn set_permissions(&self, permissions: c_int) -> bool
Sets permissions for this file or directory.
Sourcefn 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).
Sourcefn set_volume(&self, volume: &str)
fn set_volume(&self, volume: &str)
Sets the volume specifier.
Sourcefn should_follow_link(&self) -> bool
fn should_follow_link(&self) -> bool
Return whether some operations will follow symlink.
Sourcefn 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.
Sourcefn 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.
Sourcefn dir_exists_str(dir: &str) -> bool
fn dir_exists_str(dir: &str) -> bool
Returns true if the directory with name dir exists.
Sourcefn 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.
Sourcefn file_exists_str(file: &str) -> bool
fn file_exists_str(file: &str) -> bool
Returns true if the file with name file exists.
Sourcefn get_cwd(volume: &str) -> String
fn get_cwd(volume: &str) -> String
Retrieves the value of the current working directory on the specified volume.
Sourcefn get_home_dir() -> String
fn get_home_dir() -> String
Returns the home directory.
Sourcefn get_temp_dir() -> String
fn get_temp_dir() -> String
Returns the directory used for temporary files, for current user.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn set_cwd_str(cwd: &str) -> bool
fn set_cwd_str(cwd: &str) -> bool
Changes the current working directory.
Sourcefn url_to_file_name(url: &str) -> FileName
fn url_to_file_name(url: &str) -> FileName
Converts URL into a well-formed filename.
Sourcefn file_name_to_url<F: FileNameMethods>(filename: &F) -> String
fn file_name_to_url<F: FileNameMethods>(filename: &F) -> String
Converts wxFileName into an URL.
Sourcefn strip_extension(fullname: &str) -> String
fn strip_extension(fullname: &str) -> String
Strip the file extension.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".