Coder Social home page Coder Social logo

mhwdirectorywatcher's People

Contributors

ened avatar hwaxxer avatar mmorey avatar noberasco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mhwdirectorywatcher's Issues

Swift version

I had the need to monitor the changes in the Documents Folder for this open-source app, this project looked exactly what I was looking for, so I made a swift version out of it.

It would be great if you can review it, and if it checks out, if you would consider linking it in the README for those looking for a Swift implementation

How to show progress?

If ~10 files get transferred from iTunes, is there a way for the program to know that shows that files are currently transferring? could this be added as a callback?

Another solution from Apple

Hello,

I've been using MHWDirectoryWatcher for years, it's cool, thank you!

I found Apple has its own solution in a sample project DocInteraction, it uses "Kernel Queues" to get notifications of file system events.

It's reacts immediately, but it doesn't consider the situation that files are modifying. So after the modifying is finished, it doesn't get updated...

I'm wondering if it's possible to combine both advantages of MHWDirectoryWatcher and Kernel Queues in the future updates?

Sincerely.

code example error

Hi,

I see that the example shown in the README makes use of "weak self" to avoid retain cycles, but it is not necessary because the object retaining the block isn't self but the class MHWDirectoryWatcher

// Avoid a retain cycle
__weak typeof(self) weakSelf = self;
_dirWatcher = [MHWDirectoryWatcher directoryWatcherAtPath:kDocumentsFolder callback:^{
   // Actions which should be performed when the files in the directory 
   [weakSelf doSomethingNice];
}];

Reference: http://stackoverflow.com/questions/20030873/always-pass-weak-reference-of-self-into-block-in-arc.

Also: there is no need to restrict the podspec to iOS only. It works equally on OS X as well, but you won't be able to use it with CocoaPods because of this.

Other than that, keep up the good work :)

build issue with typeof(self)

Hi,

I am having some build issues with the: __weak typeof(self) weakself = self;
I am using Xcode 6.3 and the LLVM 6.1 compiler
I used __weak id weakself = self instead but it would be nice to know if there is a configuration I'm missing to make it work as intended

Thanks

PS: very useful, thanks for your effort

How to get file information change?

I would like to be informed when a file was deleted, added or renamed by getting the file name and the action (delete, added, renamed). Is this possible with the current implementation of MHWDirectoryWatcher? Right now it seems only inform me about a change in a monitored directory without any specification about the kind (file deleted, file added, file renamed etc.) and without any further file information (like filePath etc.)
Do you have any code samples how to implement the behaviour described above?

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.