@@ -543,6 +543,16 @@ impl FileTypeExt for fs::FileType {
543
543
/// Ok(())
544
544
/// }
545
545
/// ```
546
+ ///
547
+ /// # Limitations
548
+ ///
549
+ /// Windows treats symlink creation as a [privileged action][symlink-security],
550
+ /// therefore this function is likely to fail unless the user makes changes to
551
+ /// their system to permit symlink creation. Users can try enabling Developer
552
+ /// Mode, granting the `SeCreateSymbolicLinkPrivilege` privilege, or running
553
+ /// the process as an administrator.
554
+ ///
555
+ /// [symlink-security]: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links
546
556
#[ stable( feature = "symlink" , since = "1.1.0" ) ]
547
557
pub fn symlink_file < P : AsRef < Path > , Q : AsRef < Path > > ( original : P , link : Q ) -> io:: Result < ( ) > {
548
558
sys:: fs:: symlink_inner ( original. as_ref ( ) , link. as_ref ( ) , false )
@@ -572,6 +582,16 @@ pub fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> io:
572
582
/// Ok(())
573
583
/// }
574
584
/// ```
585
+ ///
586
+ /// # Limitations
587
+ ///
588
+ /// Windows treats symlink creation as a [privileged action][symlink-security],
589
+ /// therefore this function is likely to fail unless the user makes changes to
590
+ /// their system to permit symlink creation. Users can try enabling Developer
591
+ /// Mode, granting the `SeCreateSymbolicLinkPrivilege` privilege, or running
592
+ /// the process as an administrator.
593
+ ///
594
+ /// [symlink-security]: https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links
575
595
#[ stable( feature = "symlink" , since = "1.1.0" ) ]
576
596
pub fn symlink_dir < P : AsRef < Path > , Q : AsRef < Path > > ( original : P , link : Q ) -> io:: Result < ( ) > {
577
597
sys:: fs:: symlink_inner ( original. as_ref ( ) , link. as_ref ( ) , true )
0 commit comments