@@ -91,19 +91,6 @@ use crate::{
9191} ;
9292pub use crate :: { read_glob:: ReadGlobResult , virtual_fs:: VirtualFileSystem } ;
9393
94- /// A (somewhat arbitrary) filename limit that we should try to keep output file names below.
95- ///
96- /// For the sake of consistency, this is a fixed constant that is likely to be safe across all
97- /// platforms.
98- ///
99- /// Different operating systems have different limits on file name and file path. See
100- /// [`validate_path_length`] for details. Because this only accounts for a single path segment, and
101- /// not the total path length, this cannot not guarantee a full file path is safe.
102- ///
103- /// To ensure file names are kept within this limit, call
104- /// [`FileSystemPath::truncate_file_name_with_hash`].
105- pub const MAX_SAFE_FILE_NAME_LENGTH : usize = 200 ;
106-
10794/// Validate the path, returning the valid path, a modified-but-now-valid path, or bailing with an
10895/// error.
10996///
@@ -1553,9 +1540,8 @@ impl FileSystemPath {
15531540 FileSystemPath { fs, path }
15541541 }
15551542
1556- /// Adds a subpath to the current path. The /-separate path argument might
1557- /// contain ".." or "." segments, but it must not leave the root of the
1558- /// filesystem.
1543+ /// Adds a subpath to the current path. The /-separated `path` argument might contain ".." or
1544+ /// "." segments, but it must not leave the root of the filesystem.
15591545 pub fn join ( & self , path : & str ) -> Result < Self > {
15601546 if let Some ( path) = join_path ( & self . path , path) {
15611547 Ok ( Self :: new_normalized ( self . fs , path. into ( ) ) )
@@ -1568,7 +1554,7 @@ impl FileSystemPath {
15681554 }
15691555 }
15701556
1571- /// Adds a suffix to the filename. [ path] must not contain `/`.
1557+ /// Adds a suffix to the filename. ` path` must not contain `/`.
15721558 pub fn append ( & self , path : & str ) -> Result < Self > {
15731559 if path. contains ( '/' ) {
15741560 bail ! (
@@ -1583,12 +1569,12 @@ impl FileSystemPath {
15831569 ) )
15841570 }
15851571
1586- /// Adds a suffix to the basename of the filename. [ appending] must not
1587- /// contain `/`. Extension will stay intact.
1572+ /// Adds a suffix to the basename of the file path. ` appending` must not contain `/`. The [file
1573+ /// extension][FileSystemPath::extension] will stay intact.
15881574 pub fn append_to_stem ( & self , appending : & str ) -> Result < Self > {
15891575 if appending. contains ( '/' ) {
15901576 bail ! (
1591- "FileSystemPath(\" {} \" ).append_to_stem(\" {} \" ) must not append '/'" ,
1577+ "FileSystemPath({:?} ).append_to_stem({:?} ) must not append '/'" ,
15921578 self . path,
15931579 appending,
15941580 )
@@ -1628,14 +1614,15 @@ impl FileSystemPath {
16281614 None
16291615 }
16301616
1631- /// DETERMINISM: Result is in random order. Either sort result or do not depend
1632- /// on the order.
1617+ /// DETERMINISM: Result is in random order. Either sort the result or do not depend on the
1618+ /// order.
16331619 pub fn read_glob ( & self , glob : Vc < Glob > ) -> Vc < ReadGlobResult > {
16341620 read_glob ( self . clone ( ) , glob)
16351621 }
16361622
1637- // Tracks all files and directories matching the glob
1638- // Follows symlinks as though they were part of the original hierarchy.
1623+ // Tracks all files and directories matching the glob using the filesystem watcher. Follows
1624+ // symlinks as though they were part of the original hierarchy. The returned [`Vc`] will be
1625+ // invalidated if a file or directory changes.
16391626 pub fn track_glob ( & self , glob : Vc < Glob > , include_dot_files : bool ) -> Vc < Completion > {
16401627 track_glob ( self . clone ( ) , glob, include_dot_files)
16411628 }
@@ -2046,7 +2033,7 @@ pub enum LinkContent {
20462033 ///
20472034 /// We don't use the [`FileSystemPath`] to store the target, because the [`FileSystemPath`] is
20482035 /// always normalized. In [`FileSystemPath::write_symbolic_link_dir`] we need to compare
2049- /// `target` with the value returned by [`sys ::fs::read_link`].
2036+ /// `target` with the value returned by [`std ::fs::read_link`].
20502037 Link {
20512038 target : RcStr ,
20522039 link_type : LinkType ,
0 commit comments