VirtualFile for a filename without path?
Hi,
I'd like to assign a certain file type to files without extension (i.e. bash scripts).
I managed this by using FileTypeConsumer.consume(FileType, FileNameMatcher) .
FileNameMatcher only get ths file without path, though.
Now I only want accept those files which begin with the shebang line (#!/bin/sh).
How can I get the full path to the file?
Thank you!
Wallaby
Please sign in to leave a comment.
Hello Wallaby,
You can't. The type of a virtual file must be determined by its name only,
without looking at its content.
=--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"