Inconsistent/incorrect file path case from getFilePath
See original GitHub issueDescribe the bug Version: 13.0.0
Path returned by SourceFile.getFilePath()
has incorrect case when retrieved via a Type
-> Symbol
-> InterfaceDeclaration
, but not when retrieved via Project#getSourceFiles
Not sure if I’m doing something wrong, I’m very new to this library.
To Reproduce
project.getSourceFiles().forEach(sourceFile => {
console.log("path " + sourceFile.getFilePath())
// path /Users/rhys/Projects/ts-auto-guard-test/src/Thing.ts - CORRECT
// ...
if (type.isInterface()) {
const declarations = type.getSymbol()!.getDeclarations();
const declaration = declarations.find(TypeGuards.isInterfaceDeclaration)!;
const sourcePath = declaration.getSourceFile()!.getFilePath()
console.log("path " + sourcePath)
// path /Users/rhys/Projects/ts-auto-guard-test/src/thing.ts - INCORRECT
}
Expected behavior
Paths are same as the file path, maintaining capitalization.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
How can I obtain the case-sensitive path on Windows?
Here is a solution that worked for me to move files between Windows and a server using case sensitive paths. It walks down...
Read more >How to get file path automatically in activity for another system?
@Yoga_Sandeep, Probably best way is to use relative path rather than full path. @Bhavik_Solanki We can't able to get file path automatically?
Read more >How to get Case Sensitive Filename/Path in MFC - MSDN
Hi,. I need to get the Case sensitive Filename and Path to chek if the filename described in an XML file and the...
Read more >Log files for IBM Case Manager installation
The IBM Case Manager installation log is located in the logs directory in the location where you installed IBM Case ... Operating system,...
Read more >Changing exhibit file paths - LexisNexis
Linked exhibits and other case files should be stored in a network folder so other case users can access them. You can change...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, loving your library btw, it’s made this project really easy. Open to any feedback on the code too if you see anything I’m doing wrong. I’m new to this.
Absolutely. Me too. 😉