[Lazarus] target filename extension

Graeme Geldenhuys graemeg.lists at gmail.com
Wed May 21 14:13:47 CEST 2008


Mattias Gärtner wrote:
>> least easily). I often use the search feature in Total Commander, feed
>> the results to a Panel and delete everything it found.
> 
> Can it search for files without extension?

If you put in * it should find them, but you can search for '*.ppu;*.o' 
and executables without extensions. The major issue is that Windows 
doesn't have a File Attribute = execute.

> 
> Well, apparently you prefer the 'file extension = file type' idea. You will hate
> Macs.

I like the idea of not using extensions, but then again, it makes life 
really hard.  How do you know what file type you have when working from 
the command line in linux for example. That's why in Mac Finder and 
Windows Explorer I enable 'show file extensions'.

Example:

graemeg at graemeg:tmp$ ls -l untit*
-rw-r--r-- 1 graemeg graemeg  7280 2008-05-21 13:50 untitled1
-rw-r--r-- 1 graemeg graemeg  2311 2008-05-21 13:51 untitled2
-rw-r--r-- 1 graemeg graemeg 96256 2008-05-21 13:51 untitled3

Here it lists three files of different types. OpenDocument Text, Rich 
Text and MS Word respectively.  You have no idea knowing that from the 
command line, other than using some hex editor to peak at the first 3-5 
bytes of the file (a process way above the avg user).

As a test, I opened Nautilus. As with most Linux apps, it normally 
detects the file via it's magic number or something, not the file 
extension. The first two worked by simply double clicking on them, but 
it had no idea what 'untitled3' was (MS Word document). Strange!

Using file extensions simply gives you a nice fallback option (hint) as 
to what mime type it is.

Here is an interesting article (thoughts) from L505. The title 'The 
Stupidity of Files Without Extensions' says it all. ;-)

http://z505.com/cgi-bin/qkcont/qkcont.cgi?p=The%20Stupidity%20of%20Files%20Without%20Extensions


> 
> It is a secret and only told the most fearless Mac users (those using the
> terminal). ;)

So on a Mac, what's the different between a .app and .cmg (I think it 
was) files? Are they both folders? I had to unmount the .cmg file, so I 
take it, it's some kind of drive image file...

>> Any other suggestions for a linux application extension?
> 
> .linux or .elf

I like .elf!  :-)


Regards,
   - Graeme -


_______________________________________________________
fpGUI - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/





More information about the Lazarus mailing list