Giter VIP home page Giter VIP logo

rxjavafileutils's People

Contributors

benjchristensen avatar robertroeser avatar stevegury 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

Watchers

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

rxjavafileutils's Issues

Inconsistencies in events between operating systems

Hi, we're looking at this library to see whether it will be useful in one of our projects. A first question is whether this library is still maintained and whether people are using it, especially given that it is not that active in commits...

Since this repo does not have much documentation, we're left to figuring out how the API works and what it all does by looking at the code, unit test (single) and just experimenting (which is actually the way I prefer to do things). We're looking at a couple of scenario's right now that sparked some curiosity and raised some questions. These mainly have to do with the events that are being produces by the Observable and their differences between Mac and Windows systems.

(You can find the code for the file system monitor here)

Scenario 1: If a file exists on startup and gets changed after startup
On Mac we get a CREATE event for both the folder and the file (both with absolute path), followed by a DELETE of the file with a relative path, even though it still exists
On Windows we get only a MODIFY event, however, it contains an invalid path: if we watch the directory <project-base-dir>/target/test/FileUtils/ containing a file hello.txt, the path we get is <project-base-dir>/hello.txt. This happens in all following scenarios on Windows as well!

Scenario 2: Scenario 1 followed by another change
On Mac will add a MODIFY event for both the folder and file
On Windows will add a MODIFY event for only the file

Scenario 3: Deleting a file
On Mac will cause a MODIFY on the folder and a DELETE on the file (the latter with a relative path)
On Windows will cause a DELETE on the file alone

Scenario 4: Copy pasting a large file (3,28GB) into the monitored folder
On Mac gives a CREATE on both folder and file, immediately followed by a MODIFY on the file
On Windows gives a CREATE on the file alone, immediately followed by a MODIFY on the file and another MODIFY on the file as soon as the copy-paste has finished

Scenario 5: (only tested on Windows) writing in a file and saving it
On Windows gives inconsistently one or two MODIFY events on the file

Are we missing something here, or are these real bugs. If so, are these already known (can't find any issues on that in this repository) and are they related to either this library or the underlying java.nio.* package?

Curious to see if there are any projects that use this library and how they deal with these scenarios!

API is awkward

At the moment the API is Map<Path, Kind[]> -> Observable<WatchEvent<?>> and Path -> Kind[] -> Observable<WatchEvent<?>>. This seem too literal of an interpretation of the underlying API.

The first problem that I have is that notification that events were dropped (WatchEvent<Object>) and changes (WatchEvent<Path>) means that the Observable has to have a wild card type. I would like to see the API have a stronger type definition. Two ideas that i've had are:

  • separate the events as two streams one of Observable<WatchEvent<Path>> and the other of Observable<Void>
  • use an Either type Observable<Either<WatchEvent<Path>,Void>>

The second is that I'm not sure why there is a method that takes Map<Path, Kind[]> couldn't that be done externally as the flatMap of individual Path -> Kind[] -> Observable<WatchEvent<Path>>.

Deployed to Maven Central?

Hi guys,

I could not find anything for "rxjava-file-utils" on maven central. The documentation tells me, there should be something...
Could you double check this?

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.