R
R
Roman Rakzin2016-07-31 17:46:14
go
Roman Rakzin, 2016-07-31 17:46:14

How to find out that there have been changes in the project (files and folders)?

It is necessary that as soon as something has changed in a certain folder, immediately execute the code.
That is, I change files in the project, add, delete folders and immediately need to change the updated.txt file, writing the update time into it.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Z
Zelimkhan Beltoev, 2016-07-31
@TwoRS

You are advised not at all.
For such a task, you need to use FileSystemWatcher. A ready-made example for your task: www.codeproject.com/Articles/26528/C-Application-t...

Владимир, 2016-07-31
@rostel

в ядре linux есть подсистема inotify, которая может генерировать события связанные с файлами и каталогами.
дальше гуглите.

Дмитрий Ковальский, 2016-07-31
@dmitryKovalskiy

Для такой задачи есть source control.

A
Alexander Movchan, 2016-07-31
@Alexander1705

Проверяйте в цикле дату изменения файлов: os.Stat, os.FileInfo.
Upd. Кажется, это - то что вы ищите.

Владимир Грабко, 2016-08-01
@VGrabko

for + hash

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question