How to filter git diff based on file extensions?
Is there an option to restrict git diff to a given set of file extensions? 10 Answers 10
Is there an option to restrict git diff to a given set of file extensions? 10 Answers 10
Since I started learning Objective-C and Cocoa, I’ve been wondering why they have chosen the extension .m for the implementation files – was it supposed to mean something, or was it just a random letter? 3 Answers 3
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 7 years ago. Improve this question What is the difference between the .htm and .html file extension? Why there are two of … Read more
I’m working on a certain program where I need to do different things depending on the extension of the file. Could I just use this? if m == *.mp3 … elif m == *.flac … 13 Answers 13
I’m wondering what the difference between .phtml and .php files is, and when to use one over the other. 6 Answers 6
I often use JPEG images, and I have noticed that there are two very similar file extensions: .jpg, which my mobile’s camera and the Preview application use, and .jpeg, with which Image Capture saves the images from scanning with my Canon MX455 printer. LaTeX doesn’t seem to distinguish, as I gave it a .jpeg with … Read more
I program in WPF C#. I have e.g. the following path: C:\Program Files\hello.txt and I want to extract hello from it. The path is a string retrieved from a database. Currently I’m using the following code to split the path by ‘\’ and then split again by ‘.’: string path = “C:\\Program Files\\hello.txt”; string[] pathArr … Read more
On a Linux machine I would like to traverse a folder hierarchy and get a list of all of the distinct file extensions within it. What would be the best way to achieve this from a shell? 17 Answers 17
This question already has answers here: How to get a file’s extension in PHP? (30 answers) Closed 2 years ago. I wish to get the file extension of an image I am uploading, but I just get an array back. $userfile_name = $_FILES[‘image’][‘name’]; $userfile_extn = explode(“.”, strtolower($_FILES[‘image’][‘name’])); Is there a way to just get the … Read more
See code: var file1 = “50.xsl”; var file2 = “30.doc”; getFileExtension(file1); //returns xsl getFileExtension(file2); //returns doc function getFileExtension(filename) { /*TODO*/ } 36 s 36