Package

com.swoval.files

node

Permalink

package node

Visibility
  1. Public
  2. All

Type Members

  1. class CacheObserver[T] extends AnyRef

    Permalink

    An observer of cache events.

    An observer of cache events.

    Annotations
    @JSExportTopLevel( "CacheObserver" ) @JSExportAll()
  2. class FileTreeRepository[T <: AnyRef] extends AnyRef

    Permalink

    Provides an in memory cache of portions of the file system.

    Provides an in memory cache of portions of the file system. Directories are added to the cache using the FileTreeRepository.register method. Once a Path is added the cache, its contents may be retrieved using the FileTreeRepository.list method. The cache stores the path information in FileTreeDataViews.Entry instances.

    A default implementation is provided by FileTreeRepositories.get. The user may cache arbitrary information in the cache by customizing the Converter that is passed into the factory FileTreeRepositories.get.

    The cache allows the user to register a regular file, directory or symbolic link. After registration, the cache should monitor the path (and in the case of symbolic links, the target of the link) for updates. Whenever an update is detected, the cache updates its internal representation of the file system. When that is complete, it will notify all of the registered com.swoval.files.Observers of the change. In general, the update that is sent in the callback will be visible if the user lists the relevant path. It is however, possible that if the file is being updated rapidly that the internal state of the cache may change in between the callback being invoked and the user listing the path. Once the file system activity settles down, the cache should always end up in a consistent state where it mirrors the state of the file system.

    The semantics of the list method are very similar to the linux ls tool. Listing a directory returns all of the subdirectories and files contained in the directory and the empty list if the directory is empty. Listing a file, however, will return the entry for the file if it exists and the empty list otherwise.

    T

    the type of data stored in the FileTreeDataViews.Entry instances for the cache

    Annotations
    @JSExportTopLevel( "FileTreeRepository" ) @JSExportAll()
  3. class JSEither[L, R] extends AnyRef

    Permalink

    Represents a value that can take one of two types.

    Represents a value that can take one of two types. It is right biased, so that the get and getOrElse correspond to the right value type.

    L

    The type of the "left" value

    R

    The type of the "right" value

    Annotations
    @JSExportTopLevel( "Either" ) @JSExportAll()
  4. class JSLeftProjection[+L, +R] extends AnyRef

    Permalink

    Represents a left projected JSEither, which adds

    Represents a left projected JSEither, which adds

    Annotations
    @JSExportAll()
  5. class Observer[T <: AnyRef] extends AnyRef

    Permalink

    An observer of cache events.

    An observer of cache events.

    Annotations
    @JSExportTopLevel( "Observer" ) @JSExportAll()
  6. class PathWatcher extends AnyRef

    Permalink

    Watches directories for file changes.

    Watches directories for file changes. The api permits recursive watching of directories unlike the java.nio.file.WatchService. Some of the behavior may vary by platform due to fundamental differences in the underlying file event apis. For example, Linux doesn't support recursive directory monitoring via inotify, so it's possible in rare cases to miss file events for newly created files in newly created directories. On OSX, it is difficult to disambiguate file creation and modify events, so the kind of event is best effort, but should not be relied upon to accurately reflect the state of the file.

    Annotations
    @JSExportTopLevel( "PathWatcher" ) @JSExportAll()
  7. class TypedPath extends AnyRef

    Permalink

    Represents a file system path.

    Represents a file system path. Provides (possibly) fast accessors for some properties of the file. It is generally unsafe to cache as the properties do not change if the underlying file is modified.

    Annotations
    @JSExportTopLevel( "TypedPath" ) @JSExportAll()

Value Members

  1. object CacheObservers

    Permalink
    Annotations
    @JSExportTopLevel( "CacheObservers" ) @JSExportAll()
  2. object FileTreeDataViews

    Permalink
    Annotations
    @JSExportTopLevel( "FileTreeDataViews" ) @JSExportAll()
  3. object FileTreeRepositories

    Permalink
    Annotations
    @JSExportTopLevel( "FileTreeRepositories" ) @JSExportAll()
  4. object PathWatchers

    Permalink
    Annotations
    @JSExportTopLevel( "PathWatchers" ) @JSExportAll()

Ungrouped