|
I am writing a "Total Commander" like application in Java. There is quite obvious file system dependency here.
I want to unit test it. I created directory structure for test purposes, I keep it in known location in SVN repository. It works great so far...
Started by Ula Krukar on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Would be simple:
create a directory put some hidden and visible files into it test tear down by removing the directory I would prefer to abstract file system, so that my unit-test wouldn't require access to real file system....
|
|
This question discusses the possibility of a virus setting the show hidden files values to true. Why would a virus do this? I would think it would want to make itself a hidden file then always set show hidden files to false.
Started by indyK1ng on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
Trying to hide it's files, but showing hidden files.
Sloppy coding.
To deter their removal.
|
|
How can I determine whether a certain path points to a hidden file/folder?
NSString *file = @"/my/file/some.where"; BOOL fileIsHidden = // <-- what do I do here?
I know that hidden files are prefixed by a period. This is not the only criteria for a...
Started by rein on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
The Finder maintains its own the file (or ....
Philosophical bit first:
No file is actually hidden.
Hope this helps.
To deal with this is; it only matters if you have a visible symlink to a file inside a hidden folder.
|
Ask your Facebook Friends
|
I would like to know how to programmatically hide a file but making the file or folder still hidden with Show hidden files and folders enabled from the Tools->Folder options of Explorer.
I hope I am not confusing anyone and if I might be please just...
Started by Victor43 on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Thanks....
FILE_ATTRIBUTE_HIDDEN);
As for keeping a file hidden from the "show hidden files" option to access/execute the file as-is while it is "hidden", then you're probably (hopefully) out of luck.
|
|
I am using the TextWriter to try to write to a hidden file, and it is throwing an exception. I can't seem to figure out how to write to a hidden file.
using (TextWriter tw = new StreamWriter(filename)) { tw.WriteLine("foo"); tw.Close(); }
Exception:
Unhandled...
Started by esac on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Www.dotnetspark.com/Forum/314-accessing-hidden-files-and-write-it.aspx
1- Set File as Visible so + @"\hiddenFile.txt"); // Remove the hidden attribute of the file myFile.Attributes |= FileAttributes.Normal;
2- Make....
|
|
I often use SCP to copy files around - particularly web-related files. The problem is that whenever I do this, I can't get my command to copy hidden files (eg, .htaccess).
I typically invoke this:
scp -rp src/ user@server:dest/
This doesn't copy hidden...
Answer Snippets (Read the full thread at serverfault):
Nevertheless, testing and research bear you out:dest/
This will create a directory ... .
The / at the end of the source says "every file under this directory".
Manual page is worth reading.)
That should absolutely match hidden files.
|
|
I have some code that effectively does this :
File file = new File("C:\\Program Files (x86)\\Something\\fred.txt"); System.out.println("file.canWrite() = " + file.canWrite());
It prints true. Now the odd thing is, I can create the file without any exceptions...
Started by nevster on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Should find your file in C:\Users\<username>\AppData\Local\VirtualStore\<insert>\<.
|
|
What is the best way to do cross-platform handling of hidden files? (preferably in Python, but other solutions still appreciated)
Simply checking for a leading '.' works for *nix/Mac, and file attributes work on Windows. However, this seems a little simplistic...
Started by Kai on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
We pass each file through these to see if it should be hidden or not....
What we do is have a number of different "hidden file checkers" that are registered with a main checker.
We actually address this in a project we write.
|
|
Is there an easy way to recursively copy all hidden files in a directory to another directory? I would like to back up just all the settings files in a home directory, not the normal files. I tried:
cp -R .* directory
but it recognizes . and .. and recursively...
Started by Zifre on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at serverfault):
Other pattern matches are available ( .??* , .[^.]* ) - see the comments
I've always used .??* to find hidden files without.
To have a hidden file that doesn't start with one of those characters.
|
|
I'm looking for a regex to match every file begining with a "." in a directory.
I'm using CMake (from CMake doc : "CMake expects regular expressions, not globs") and want to ignore every file begining with a dot (hidden files) BUT "\..*" or "^\..*" doesn...
Started by claferri on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Open a file "test.cmake" and add the following:
file(GLOB ALL "*") file(GLOB DOT ".*") file(GLOB NOTDOT "[^.]*") message("All.
Try this.
^\..*
Try this:
^[.].*
Sounds like GLOB is probably what you want .
|