Home

Class goog.testing.fs.DirectoryEntry

A mock directory entry object.

extends goog.testing.fs.Entry
Instance Method Summary
clone() ⇒ !goog.testing.fs.Entry
createDirectorySync(string path) ⇒ !goog.testing.fs.DirectoryEntry

Creates a directory synchronously. This is a shorthand for getFileSync, useful for setting up tests.

createFileSync(string path) ⇒ !goog.testing.fs.FileEntry

Creates a file synchronously. This is a shorthand for getFileSync, useful for setting up tests.

getDirectory(string path, ?goog.fs.DirectoryEntry.Behavior= opt_behavior) ⇒ !goog.async.Deferred
getDirectorySync(string path, ?goog.fs.DirectoryEntry.Behavior= opt_behavior) ⇒ !goog.testing.fs.DirectoryEntry

Get a directory synchronously, without waiting for a Deferred to resolve.

getEntry_(string path, ?goog.fs.DirectoryEntry.Behavior behavior, boolean isFile, function (goog.testing.fs.DirectoryEntry, string): goog.testing.fs.Entry createFn) ⇒ !goog.testing.fs.Entry

Get a file or directory entry from a path. This handles parsing the path for subdirectories and throwing appropriate errors should something go wrong.

getFile(string path, ?goog.fs.DirectoryEntry.Behavior= opt_behavior) ⇒ !goog.async.Deferred
getFileSync(string path, ?goog.fs.DirectoryEntry.Behavior= opt_behavior) ⇒ !goog.testing.fs.FileEntry

Get a file entry synchronously, without waiting for a Deferred to resolve.

getLastModified() ⇒ !goog.async.Deferred
hasChild(string name) ⇒ boolean

Returns whether this directory has a child with the given name.

isDirectory() ⇒ boolean
isFile() ⇒ boolean
listDirectory() ⇒ !goog.async.Deferred
remove() ⇒ !goog.async.Deferred
removeRecursively() ⇒ !goog.async.Deferred