Git operations that changes file system doesn't trigger FileWatcher [closed] - c#

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have an interesting problem, my system is a winforms, but also console app, that watchers for file changes in a folder.
Everything works great, but if that folder is a local git repo and there are operations that would change the files, the file watcher is not fired!
ex:
git restore 1.txt
The above removes the change from the git working tree and will not trigger the filewatcher.

Related

a legacy screen was translated to the a web page (asp.net). the screen is multi text lines screen - users can't copy and paste multiple lines & paste [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
multiline screen
A user cannot copy these lines and paste them in the same order. all it allows them is copy a line at a time. Please advise a way to achieve this
I am not a web person - i'm looking out for a solution/any advise on how this can be achieved.

How to start a program with process.start without that the program can't find it's files [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I'm trying to make a program, which can open other programs, but I need help, because if I run a program, with
Process.Start(ExePath)
I get errors like 'cannot find 'File.*' file'.
but normally the program works when I start it manually it just works normally
does someone knows how to fix this?
Thanks in advance
You can build a full qualified path starting from your current application directory like this:
string exepath = Path.Combine(Environment.CurrentDirectory, "Games", "Game.exe");
Process.Start(exepath);
adopted from Specifying a relative path

attach file to an email in c# [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
How to attach some files or folders as one compressed file to an email in c# ?
For example assume I have 2 folders and 3 files and it is necessary that I attach these files and folders into one compressed file.
You can use DotNetZip for compressing the folder as there is a method exactly for this task :
using (var zip = new ZipFile())
{
zip.AddDirectory("DirectoryOnDisk", "rootInZipFile");
zip.Save("MyFile.zip");
}
After that you have to simply attach it to the email (
.AddAttachment(..)
).

How can I tell the difference between source and published .NET code? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
How can I tell the difference between source and published .NET code?
I am looking at some inherited code that I have not touched in about a year. The original designer had me first publish locally before uploading the published code to the internet server. Now I am looking a number of backed up source folders as well bas backed up published folders. I should have done a better job at naming the folders, I guess. Now I wonder: How can I tell the difference between source and published .NET code? Is there some easy way to see if some folder that contains only published code is lacking a file or xml setting?
As changes are made, they are published in the UI, so that means there should be some new files, or deleted files, and the directory tree may not be 100% the same. What you could do is download the deployed code to your local machine, and use a tool like Beyond Compare or some other directory comparer and let it determine the markup changes for you. There are several tools that do a good job for this.
That would give you an idea of the difference between files, but won't parse DLL's. That you would have to use a tool like reflector or Telerik's JustDecompile to compare the code, but I really wouldn't go that far, but you could.

C# : file copy notifying [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
hi i am creating a c# application that monitor the files that has been copied , the aim of program is to alert user that there is a file has been copied , i know the file system watcher class , but it has only 4 events , change or create or delete or rename , is there a way to know if file has been copied in or out of system ?
When a file is copied into the system you will also get a change or create event. But if it is simply accessed (which is what happens when it is copied) FileSystemWatcher is of no use.
You can use Auditing file and folder access feature of Windows.
The task makes no sense. First of all, there's no "copy" operation on the OS level. Copy is a sequence of open/read/close (source) + create/write/close (dest) operations. Now, even if such operation existed (eg. Explorer has such concept), what about archiving the file and then copying out the archive?

Categories

Resources