Toggle to hide/show hidden files
EDIT by @jancborchardt
Solution: We have a settings area in the Files app now so that’s perfect for putting a setting checkbox called »Show hidden files«. Which would be disabled by default. The setting should be persistent across sessions, if changed.
Don’t bother reading the comment thread.
If this is only about pictures and thumbnails, the issue should be filed in the apps repo: https://github.com/owncloud/apps , but the question of how to handle hidden files isn't specific to that app: i.e.: should the ownCloud server identify unix hidden files & folders, mask them from view and exclude them from showing in apps, search, etc.
Good observations. This discussion is also not specific to unix either, but also applies to other file properties in other OS, like Windows, say. I will post the issue in apps in the meanwhile.
I've renamed this issue to broaden its scope to the general handling of hidden files.
This is an interesting question I also pondered. In general I’m a bit hesitant about adding any additional options or toggles in the ownCloud interface, especially for nerdy stuff like this. So let’s analyze 2 possible defaults:
- show hidden files: we currently do this, I think. Which are hidden files/folders which are shown but should not? I think there’s a blacklist for stuff like .git and such? What value brings showing hidden files at all?
- hide hidden files: the default of any operating system. Some have a toggle to show the files.
I think hidden files should be hidden in the Files app and there should be no option to show them. What are arguments against it?
@jancborchardt most obvious is Windows. It has a dedicated attribute to hide the files which is uncommon with *nix systems
@jancborchardt I have two or three .hidden folders where I put stuff that are use very rarely, like scripts or configs. I don't want to see them usually, only once every 3 months or so. They just take vertical space, a toggle to show/hide them would be awesome. I am fine if it is only a shortcut (like Alt+. as in KDE).
@blizzz oh nice, good point with only exposing it via typical keyboard shortcut!
So, what do y’all say – default to hide hidden files?
@jancborchardt This solution would indeed resolve my initial issue.
JQuery could help out. Basically this scripts checks the event fired by a keystroke. If the keystroke was alt +, it loops over all files and checks if the name starts with a dot. If so, .toggle() is invoked, toggling visibility of this element in the filelist.
$(document).ready(function()
{
$(window).keydown(function(event) {
//+ fires event 107
if (event.altKey && event.which === 107) {
//get all the table rows with files and loop (each)
$('#fileList [data-file^="."]').each(function(){
$(this).toggle();
});
}
});
});
is this an idea?
pull request? :)
I would like to use OwnCloud to remote access and share files located on a Linux server.
These files are mostly read/writen by osx machines, so there's .xxx files everywhere, and these files are usefull for our osx machines (usage of folder colors etc...)
These files are of no interest in Windows/Nix and Web Browsers, so they should be hidden on them.
I have a profond respect for people bringing the community such a great peace of software, but I really don't understand the logic in forced showing the hidden files. If hidden files are possible in most operating systems, and often a useful feature, why not letting users the ability to respect this ?
I would very much appreciate an admin flag or some respect_hidden_files = "true" option in config file to do this. I would have tried to do this myself, but as a new-bee in OC, it's rather hard.
May anyone help / guide ?
Best regards
but I really don't understand the logic in forced showing the hidden files. If hidden files are possible in most operating systems, and often a useful feature, why not letting users the ability to respect this ?
There's no force involved. A sensible pull request from someone with the time/ability/interest in doing it would suffice.
but as a new-bee in OC, it's rather hard.
Everyone involved in oC was a n00b when we started :)
@erambour please read the discussion before your post. We decided to not show hidden files by default in the web interface (of course they would still be there and synced). And there should not be an admin switch to decide if they are shown or not.
Now the only problem is that someone needs to implement that. So @erambour can you do it?
@jancborchardt, Sorry it was not so clear to me in the above messages that a decision was taken (maybe 'im not fluent enough in english) but i' glad to read this.
Unfortunately, my skills in programming where rather good ... in the time where cpu's where 8bit's, i tried to look a the code (i know a little php) but feel rather lost :-)
I'm not the guy who will do that :-(
Can we please have someone just implement this? Do not show hidden files, simple as that. We don’t even need the shortcut to show them for the first iteration. Currently ownCloud is probably the only file manager which shows hidden files by default.
Calling in @Kondou-ger @kabum because I know you can do that. :)
Can we please have someone just implement this? Do not show hidden files, simple as that. We don’t even need the shortcut to show them for the first iteration.
That would be a regression for me and break how I deal with my ownCloud. Shortcut is a must for this imho, only then it is an improvement.
Closing this because of the good points regarding platform-incompatibility discussed in #4369.
Ok … so we should not say this is a client issue, because there can be several clients. Can we just have a simple blacklist of files which should be hidden? .DS and ._.DS files as well as Thumbs.db come to mind. That would probably take care of 90% of these problems.
cc @zinkdifferent
Can we just have a simple blacklist of files which should be hidden?
Ok - these file got uploaded and I cannot see them. How can I remove them?
AFAIK mac os is duplicating the files in the .DS - right? There is some impact on quota as well.
blacklist Thumbs.db
I better get working on my Thumbnail library, that stores stuff in a DB :wink:
IMO these files shouldn't be uploaded by a client, except especially told to do so.