Skip to content

Commit e374c91

Browse files
committed
Stabilize Windows FileTypeExt with is_symlink_dir and is_symlink_file
These calls allow detecting whether a symlink is a file or a directory, a distinction Windows maintains, and one important to software that wants to do further operations on the symlink (e.g. removing it).
1 parent bd2e51a commit e374c91

File tree

1 file changed

+4
-4
lines changed
  • library/std/src/os/windows

1 file changed

+4
-4
lines changed

library/std/src/os/windows/fs.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -502,17 +502,17 @@ impl MetadataExt for Metadata {
502502
/// Windows-specific extensions to [`fs::FileType`].
503503
///
504504
/// On Windows, a symbolic link knows whether it is a file or directory.
505-
#[unstable(feature = "windows_file_type_ext", issue = "none")]
505+
#[stable(feature = "windows_file_type_ext", since = "1.64.0")]
506506
pub trait FileTypeExt {
507507
/// Returns `true` if this file type is a symbolic link that is also a directory.
508-
#[unstable(feature = "windows_file_type_ext", issue = "none")]
508+
#[stable(feature = "windows_file_type_ext", since = "1.64.0")]
509509
fn is_symlink_dir(&self) -> bool;
510510
/// Returns `true` if this file type is a symbolic link that is also a file.
511-
#[unstable(feature = "windows_file_type_ext", issue = "none")]
511+
#[stable(feature = "windows_file_type_ext", since = "1.64.0")]
512512
fn is_symlink_file(&self) -> bool;
513513
}
514514

515-
#[unstable(feature = "windows_file_type_ext", issue = "none")]
515+
#[stable(feature = "windows_file_type_ext", since = "1.64.0")]
516516
impl FileTypeExt for fs::FileType {
517517
fn is_symlink_dir(&self) -> bool {
518518
self.as_inner().is_symlink_dir()

0 commit comments

Comments
 (0)