Trait FileNameMethods

Source
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§

Source

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

Appends a directory component to the path.

See C++ wxFileName::AppendDir()’s documentation.

Source

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

Creates the file name from another filename object.

See C++ wxFileName::Assign()’s documentation.

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).

See C++ wxFileName::AssignCwd()’s documentation.

Source

fn assign_home_dir(&self)

Sets this file name object to the home directory.

See C++ wxFileName::AssignHomeDir()’s documentation.

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.

See C++ wxFileName::AssignTempFileName()’s documentation.

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.

See C++ wxFileName::AssignTempFileName()’s documentation.

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.

See C++ wxFileName::AssignTempFileName()’s documentation.

Source

fn clear(&self)

Reset all components to default, uninitialized state.

See C++ wxFileName::Clear()’s documentation.

Source

fn clear_ext(&self)

Removes the extension from the file name resulting in a file name with no trailing dot.

See C++ wxFileName::ClearExt()’s documentation.

Source

fn dir_exists(&self) -> bool

Returns true if the directory with this name exists.

See C++ wxFileName::DirExists()’s documentation.

Turns off symlink dereferencing.

See C++ wxFileName::DontFollowLink()’s documentation.

Source

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

Calls the static overload of this function with the full path of this object.

See C++ wxFileName::Exists()’s documentation.

Source

fn file_exists(&self) -> bool

Returns true if the file with this name exists.

See C++ wxFileName::FileExists()’s documentation.

Source

fn get_dir_count(&self) -> usize

Returns the number of directories in the file name.

See C++ wxFileName::GetDirCount()’s documentation.

Source

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

Returns the directories in string array form.

See C++ wxFileName::GetDirs()’s documentation.

Source

fn get_ext(&self) -> String

Returns the file name extension.

See C++ wxFileName::GetExt()’s documentation.

Source

fn get_full_name(&self) -> String

Returns the full name (including extension but excluding directories).

See C++ wxFileName::GetFullName()’s documentation.

Source

fn get_long_path(&self) -> String

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

See C++ wxFileName::GetLongPath()’s documentation.

Source

fn get_modification_time(&self) -> DateTime

Returns the last time the file was last modified.

See C++ wxFileName::GetModificationTime()’s documentation.

Source

fn get_name(&self) -> String

Returns the name part of the filename (without extension).

See C++ wxFileName::GetName()’s documentation.

Source

fn get_short_path(&self) -> String

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

See C++ wxFileName::GetShortPath()’s documentation.

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.

See C++ wxFileName::GetTimes()’s documentation.

Source

fn get_volume(&self) -> String

Returns the string containing the volume for this file name.

See C++ wxFileName::GetVolume()’s documentation.

Source

fn has_ext(&self) -> bool

Returns true if an extension is present.

See C++ wxFileName::HasExt()’s documentation.

Source

fn has_name(&self) -> bool

Returns true if a name is present.

See C++ wxFileName::HasName()’s documentation.

Source

fn has_volume(&self) -> bool

Returns true if a volume specifier is present.

See C++ wxFileName::HasVolume()’s documentation.

Source

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

Inserts a directory component before the zero-based position in the directory list.

See C++ wxFileName::InsertDir()’s documentation.

Source

fn is_dir(&self) -> bool

Returns true if this object represents a directory, false otherwise (i.e.

See C++ wxFileName::IsDir()’s documentation.

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.

See C++ wxFileName::IsDirReadable()’s documentation.

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.

See C++ wxFileName::IsDirWritable()’s documentation.

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.

See C++ wxFileName::IsFileExecutable()’s documentation.

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.

See C++ wxFileName::IsFileReadable()’s documentation.

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.

See C++ wxFileName::IsFileWritable()’s documentation.

Source

fn is_ok(&self) -> bool

Returns true if the filename is valid, false if it is not initialized yet.

See C++ wxFileName::IsOk()’s documentation.

Source

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

Source

fn prepend_dir(&self, dir: &str)

Prepends a directory to the file path.

See C++ wxFileName::PrependDir()’s documentation.

Source

fn remove_dir(&self, pos: usize)

Removes the specified directory component from the path.

See C++ wxFileName::RemoveDir()’s documentation.

Source

fn remove_last_dir(&self)

Removes last directory component from the path.

See C++ wxFileName::RemoveLastDir()’s documentation.

Find the absolute path of the file/directory that is pointed to by this path.

See C++ wxFileName::ResolveLink()’s documentation.

Source

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

Deletes the specified directory from the file system.

See C++ wxFileName::Rmdir()’s documentation.

Source

fn set_cwd(&self) -> bool

Changes the current working directory.

See C++ wxFileName::SetCwd()’s documentation.

Source

fn set_empty_ext(&self)

Sets the extension of the file name to be an empty extension.

See C++ wxFileName::SetEmptyExt()’s documentation.

Source

fn set_ext(&self, ext: &str)

Sets the extension of the file name.

See C++ wxFileName::SetExt()’s documentation.

Source

fn set_full_name(&self, fullname: &str)

The full name is the file name and extension (but without the path).

See C++ wxFileName::SetFullName()’s documentation.

Source

fn set_name(&self, name: &str)

Sets the name part (without extension).

See C++ wxFileName::SetName()’s documentation.

Source

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

Sets permissions for this file or directory.

See C++ wxFileName::SetPermissions()’s documentation.

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).

See C++ wxFileName::SetTimes()’s documentation.

Source

fn set_volume(&self, volume: &str)

Sets the volume specifier.

See C++ wxFileName::SetVolume()’s documentation.

Return whether some operations will follow symlink.

See C++ wxFileName::ShouldFollowLink()’s documentation.

Source

fn touch(&self) -> bool

Sets the access and modification times to the current moment.

See C++ wxFileName::Touch()’s documentation.

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.

See C++ wxFileName::CreateTempFileName()’s documentation.

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.

See C++ wxFileName::CreateTempFileName()’s documentation.

Source

fn dir_exists_str(dir: &str) -> bool

Returns true if the directory with name dir exists.

See C++ wxFileName::DirExists()’s documentation.

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.

See C++ wxFileName::Exists()’s documentation.

Source

fn file_exists_str(file: &str) -> bool

Returns true if the file with name file exists.

See C++ wxFileName::FileExists()’s documentation.

Source

fn get_cwd(volume: &str) -> String

Retrieves the value of the current working directory on the specified volume.

See C++ wxFileName::GetCwd()’s documentation.

Source

fn get_home_dir() -> String

Returns the home directory.

See C++ wxFileName::GetHomeDir()’s documentation.

Source

fn get_temp_dir() -> String

Returns the directory used for temporary files, for current user.

See C++ wxFileName::GetTempDir()’s documentation.

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.

See C++ wxFileName::IsDirReadable()’s documentation.

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.

See C++ wxFileName::IsDirWritable()’s documentation.

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.

See C++ wxFileName::IsFileExecutable()’s documentation.

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.

See C++ wxFileName::IsFileReadable()’s documentation.

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.

See C++ wxFileName::IsFileWritable()’s documentation.

Source

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

Source

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

Deletes the specified directory from the file system.

See C++ wxFileName::Rmdir()’s documentation.

Source

fn set_cwd_str(cwd: &str) -> bool

Changes the current working directory.

See C++ wxFileName::SetCwd()’s documentation.

Source

fn url_to_file_name(url: &str) -> FileName

Converts URL into a well-formed filename.

See C++ wxFileName::URLToFileName()’s documentation.

Source

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

Converts wxFileName into an URL.

See C++ wxFileName::FileNameToURL()’s documentation.

Source

fn strip_extension(fullname: &str) -> String

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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