comparison rust/hg-core/src/utils/files.rs @ 46757:3c9ddb1986a9

rust-status: fix issue6456 for the Rust implementation also This implementation is being used by a few people now, so we need it fixed, even though a big rewrite will be coming quite soon. Differential Revision: https://phab.mercurial-scm.org/D10217
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 15 Mar 2021 13:05:00 +0100
parents 91ab5190a3de
children c94fa884240b
comparison
equal deleted inserted replaced
46756:c5912e35d06d 46757:3c9ddb1986a9
196 st_nlink: metadata.nlink(), 196 st_nlink: metadata.nlink(),
197 st_size: metadata.size(), 197 st_size: metadata.size(),
198 st_mtime: metadata.mtime(), 198 st_mtime: metadata.mtime(),
199 st_ctime: metadata.ctime(), 199 st_ctime: metadata.ctime(),
200 } 200 }
201 }
202
203 pub fn is_symlink(&self) -> bool {
204 // This is way too manual, but `HgMetadata` will go away in the
205 // near-future dirstate rewrite anyway.
206 self.st_mode & 0170000 == 0120000
201 } 207 }
202 } 208 }
203 209
204 /// Returns the canonical path of `name`, given `cwd` and `root` 210 /// Returns the canonical path of `name`, given `cwd` and `root`
205 pub fn canonical_path( 211 pub fn canonical_path(