[long-term] ReactOS explorer file identification

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Post by mf »

toxigenicpoem wrote:MF, will this type of file system just check down the line of pre-registerd extionsions?
Actually, it's a transparent layer on top of any filesystem.
toxigenicpoem wrote:Also, will it need to be based in the file header information, or in the actual file itsself? I guess I ask in this way, as such on *nix, you can CHMOD a script to be Executible, and the script will execute properly, using the correct interp. Will this be able to happen with 'FileType' ? Or will new registry entries need to be made, linking 'Script' types to thier proper interpreture? (did that even make sense, LOL)
Well, for most formats, a simple "magic number" at a fixed offset will be the fastest and easiest way to determine filetype. But if no magic number can be found, FileType has a more flexible way of determining filetype for formats such as vCards.
Phalanx
Posts: 360
Joined: Sun Dec 19, 2004 12:42 am
Location: Australia

Post by Phalanx »

mf wrote:Please think very carefully specifically about your comment of "as normal users could think they are opening a picture when it is a virus or program" - what you are describing is Microsoft's extension hiding, NOT context-sensitive filetype identification. If a file is a virus or a program, a filetype prober will identify it as EXECUTABLE, not as PICTURE. Get it? No? Then shut up, please. I'm losing my patience with people who can't read and don't want to understand.
That is my point! No extension means that the icon on a file that is recognised as a PE file will show its icon that could appear as the icon of an image. Then people would simply open it. So what happens when I open windows/system32 size folder. I have a few hundred files there. Now lets say it has to scan every file there. It is not simply looking at the table of contents on the file system, it has to look at every single file, searching through the hard disk. Get it? Well, these will make opening that single folder slow, really slow. Then when you end with not all the files recognised by the time you select one. Well, if you follow its appearance while it is recognising them, that will not be the type you open it and it goes through a different system. Now you have another security hole! Then what happens when people start making files with no extensions? You are forced to use this system (and there will be file name conflicts etc..) So unless you can suggest an answer to the problems, do not state that my opinions are invalided.
Phalanx
Posts: 360
Joined: Sun Dec 19, 2004 12:42 am
Location: Australia

Post by Phalanx »

toxigenicpoem wrote:
and place a lot of wear on your hard disk
Guess I dont understand, how this is going to kill your harddrive? By spinning? pls... Thats like people thinking that monitors still have burn-in problems(screen savers are now for entertainment and joy, and lack a real usefullness as they previously did), :shock: , technologies these days have far surpassed those of old.
Even see the number of read/writes caused by Miranda IM? It is the only problem I have with the program. The simple listing of files in this layout would mean that it does not only look at the file table of contents in a file system, but also has to look at the files themselves. What happens when it comes over a folder with 6 gigs ogm files! It will take ages just to list the file, not to mention the aging you just performed on your hard disk every time you open that folder. With monitors, you made things to try and stop abusing them (screen savers, turning off etc), but this is working against the hardware. What is the problem with file extension, they might just be the best way there is (and this achieves nothing extra)!
Delfi
Posts: 76
Joined: Sat Nov 27, 2004 8:45 pm

Post by Delfi »

mf wrote:Delfi, research the subsystem concept once more. You will understand.


heh yeah i understand subsystems perfectly, but you are triying to
force unix subsystem features into win32 subsystem -> no good,
youre full of bullshit file extensions are way better than you, and
they are not limited to just 3 chars.

* i would bet that you are the "reactos communist" guy..
mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Post by mf »

Funny, how you guys can take yourself seriously.
Mammlouk
Posts: 40
Joined: Mon Nov 29, 2004 3:25 pm

Post by Mammlouk »

The system makes sense to me.

Phalanx - I don't think that you're quite understanding the concept.... The system would still use the file table of contents to see what is in the directory. Files with known extensions will not even be touched. It will see files without extensions by finding them on the table of contents, at which point it would scan those particular files for a filetype and show an equivalent extension in brackets of some sort to let you know. This information could then (theoretically) be added to the file table of contents (not quite sure how it all works) so that file that have been previously scanned are now labeled and never need to be scanned again. Does this sound more efficient to you now? Once again this would also most likely be a feature that you would have to choose to personally enable.

I'm not looking to be flamed, and I'm not trying to attack anybody. I'm just stating the way that I view this system working and feasible.
counting_pine
Posts: 237
Joined: Fri Nov 26, 2004 10:44 pm
Location: Fallowfield

Post by counting_pine »

How do you think something like this should be implemented? E.g, integrating it in the system, adding it to Explorer's functions? I'm a bit worried that integrating something like that into the system will add a lot of complication. It might go well in Explorer, but you should be able to disable it if you want to. And I don't think it should work by default on all types of media.

Generally, I think using file extensions are better, since they're well established on Windows. If I want to identify a file, I just use GT2. It usually manages to identify a file, and can often provide other information about it, e.g. if it's an image, it will probably tell you the dimensions.
uniQ
Posts: 246
Joined: Sat Dec 04, 2004 8:58 am

Post by uniQ »

mf, bit of advice, cultivate some patience, if you lose out whenever someone doesn't get it or misunderstands, you've pretty much lost the conversation and their help.

-uniQ
Coming on, coming up, let me help ROS and I'll be able to look @ a life well used.
mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Post by mf »

uniQ wrote:mf, bit of advice, cultivate some patience, if you lose out whenever someone doesn't get it or misunderstands, you've pretty much lost the conversation and their help.
The level of stupidity on this forum is too great for me. I try to explain. I make clear posts in 100% correct english with paragraphs. What do I get for it in return? The same shit. And people are surprised if that frustrates me to the point of dropping insulting remarks. It is not MY problem these people don't want to understand. If they simply read carefully, as I repeatedly advise, they will not look stupid. And I will not get frustrated, and will not make insulting remarks. Everybody happy. I have had my share of ignorant forum users. And I know when someone's trying to understand, and when someone's just being a trolling idiot that doesn't want to understand. Phalanx and Delfi here are most definitely the latter category. You think I'm wrong? PROVE ME WRONG. Show me your worth and you will get the appropriate respect. But I will not explain things in kindergarten terms. Everything anyone needs to know is said in my first post. Don't get it? Then don't respond to it, because this thread is not for you.
AcetoliNe
Posts: 115
Joined: Wed Jan 05, 2005 10:53 pm
Location: a thousand miles from Hinterland
Contact:

Post by AcetoliNe »

I like this idea, It should definately be implemented. and I don't see how it would mal-effect your system in any way if it were active, let alone if it were turned off.

Let users do what they want to do. The whole concept of open source (at least for me) is to break free of other people making decisions for you. It really pi$$e$ me off when someone says, "I don't like this feature. don't include it". Don't like it? turn it OFF!!
It's MY computer, and I'd throw it out of the window (no pun intended) if I wanted. You're worried about me wearing down my HDD? Watch me tear it out while it's still warm and vibrating, throw it on the floor and jump on it with metal-studded boots. So watch out. I've been known to do this when I'm frustrated.

Extensions are a good idea, and I certainly would not recommend anybody to not give their files extensions simply because software would recognize it. That's abuse of software, and is similar to not commenting your code (in fact, it's REAL similar... heh, that's probably the smartest thing I've said all day).

As I've always said, making assumptions about what people want sounds way too much like a certain company I know called Microsoft.

not-so-off-topic: One thing I've always had on my wishlist were Windows actually *making use* of folder metadata and data streams. Every time you open a folder (even in Win98) explorer makes a zillion calls to the registry to find out where to put the icons, etc... And windows xp is worse, probing files for thumbnails, size, etc... and storing a nasty always-fragmented Thumbs.db file in every folder that has been set to 'thumbnail', even if only once.

NTFS metadata provides a much cleaner solution, but I don't know why MS doesn't use it. (And If you want to argue that the registry is faster just because it resides in memory, know this: The folder is accessed anyway on the hard drive, so why not do an extra 9ms spin to get the metadata?)

mf: don't worry yourself buddy. There ARE mature people in this forum, and they will listen.
caveman LIKES chocolate.
we shall reinvent the wheel until it turns properly.
mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Post by mf »

I didn't even know NTFS had metadata. In that case, as mammlouk suggested, this filetype metadata could be cached, testing the "file modified" date against the cached date, to see if the file has been modified (thus possibly having changed in filetype) since the cached filetype test was done. Would be pretty damn neat imho :).
And thanks for the support Acetoline, I sometimes get to the point of pulling hairs out in here.
Toxigenicpoem
Posts: 29
Joined: Wed Jan 26, 2005 6:48 pm

Post by Toxigenicpoem »

With monitors, you made things to try and stop abusing them (screen savers, turning off etc)
My point, is that technology has advanced greatly... You seriously don't comprehend information you read do you.

but this is working against the hardware.
Do the research, over all hard-drive failures are under 1% due to mechanical malfunction. Segate reports that 40% of HardDrives returned, are not do to mechanical failure. The most critical point of a harddrives life is during the first inital spin cycle at boot up. Please use google, thats why they made it.... :wink:
SirTalon
Posts: 67
Joined: Sun Nov 28, 2004 8:53 pm

Post by SirTalon »

Actually just FYI: Linux doesn't identify any type of file based on either method unless its set to executable, and you try to execute it, then it will check if its an elf executable that it can run, an a.out executable, or a text file that starts with something that looks like

Code: Select all

#!/path/to/program/that/interprets/code

echo "this is some code"
Only the higher level programs in Linux use either method. KDE (probably Gnome too) use a mix of extensions and filecontents (its called mime types, its whats used on the internet) to identify the files and I've noticed that Konqueror can generally load a folder with thousands of files faster than explorer can load a directory with a few dozen. Most programs in Linux put an extension on files anyways cause sometimes file contents can be similar (is it a txt file or an XML file??? whos to know???).

OS X seems to have a third way, I think it embeds in the resource fork the program that created the file. When opening if thats not there it falls back to other methods (not sure if it uses extensions at all).

The issue with trojans (tricking users = trojan) is only cause by Microsoft making it so some extensions are hidden, allowing the user to be tricked by HotGurlzzzzzzz.jpg.exe (though they probably would open it even if it said HotGurlzzzzzzz.exe which is the sad part...).

Possibly add API that allows you to directly have the OS return the mime type of a file (that may be better suited as a user level library though)?
"People do have a real life." -- w3seek

Guess that means I'm not a person :-D
AcetoliNe
Posts: 115
Joined: Wed Jan 05, 2005 10:53 pm
Location: a thousand miles from Hinterland
Contact:

Post by AcetoliNe »

I didn't even know NTFS had metadata. In that case, as mammlouk suggested, this filetype metadata could be cached, testing the "file modified" date against the cached date, to see if the file has been modified (thus possibly having changed in filetype) since the cached filetype test was done. Would be pretty damn neat imho
That would be REAL cool if it could be implemented :D

And yes, NTFS has a lot of stuff that people don't recognize simply because microsoft failed to support them (Folder and file metadata, Multiple data streams, Mount points, Encryption, ...) One thing I am REALLY mad at microsoft for is Hardlinks: They are similar to symlinks in ext filesystems, but work just like a charm (even better than symlinks perhaps) in Windows, but there is NO user-level MS app to make them! Not supporting something this useful is crazy (the only way to make them, in fact, is by the CreateHardLink API).
We could make use of a lot of this beneficially in ros.
caveman LIKES chocolate.
we shall reinvent the wheel until it turns properly.
azeemarif
Posts: 25
Joined: Fri Dec 31, 2004 8:53 am

Post by azeemarif »

mf, you proposed a good idea. Something to think about and discuss further.

Acetoline, SirTalon etc. replied with great suggestions.

People who think, "whatever Microsoft does is right", are ignorant. They have done somethings right and other things wrong.

This whole ".ext" (3 letter extention) idea was DOS era left-over. But, people have got used to it (and yes it has made life easier in some cases) so we can't just discrd it. Otherwise "Mime-type" is the correct way of sorting files.

In my day job I was working on a embedded files system that needed to windows compliant, and believe me, if you push it to the limits even Windows XP has bugs in its ".ext" implemetation (most people don't come across those cases though).
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests