goog.testing.fs.DirectoryEntry
Provided By | |
---|---|
Extends | |
All Implemented Interfaces |
A mock directory entry object.
new DirectoryEntry( fs, parent, name, children )
Parameters |
|
---|
Instance Methods
this.checkNotDeleted( action ) → goog.async.Deferred
goog.async.Deferred
Return a deferred that will call its errback if this entry has been deleted. In addition, the deferred will only run after a timeout of 0, and all its callbacks will run with the entry as "this".
Defined by | |||||
---|---|---|---|---|---|
Parameters |
| ||||
Returns |
|
this.clone() → goog.testing.fs.Entry
goog.testing.fs.Entry
Overrides | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.copyTo( parent, opt_newName ) → goog.async.Deferred
goog.async.Deferred
Copy this entry to a new location.
Overrides | |||||||||
---|---|---|---|---|---|---|---|---|---|
Specified by | |||||||||
Parameters |
| ||||||||
Returns |
|
this.createDirectorySync( path ) → goog.testing.fs.DirectoryEntry
goog.testing.fs.DirectoryEntry
Creates a directory synchronously. This is a shorthand for getFileSync, useful for setting up tests.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.createFileSync( path ) → goog.testing.fs.FileEntry
goog.testing.fs.FileEntry
Creates a file synchronously. This is a shorthand for getFileSync, useful for setting up tests.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
this.createPath( path ) → goog.async.Deferred
goog.async.Deferred
Opens the directory for the specified path, creating the directory and any intermediate directories as necessary.
Specified by | |||||
---|---|---|---|---|---|
Parameters |
| ||||
Returns |
|
this.getDirectory( path, opt_behavior ) → goog.async.Deferred
goog.async.Deferred
Get a directory within this directory.
Specified by | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||
Returns |
|
this.getDirectorySync( path, opt_behavior ) → goog.testing.fs.DirectoryEntry
goog.testing.fs.DirectoryEntry
Get a directory synchronously, without waiting for a Deferred to resolve.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
this.getFile( path, opt_behavior ) → goog.async.Deferred
goog.async.Deferred
Get a file in the directory.
Specified by | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
| ||||||||
Returns |
|
this.getFileSync( path, opt_behavior, opt_data, opt_type ) → goog.testing.fs.FileEntry
goog.testing.fs.FileEntry
Get a file entry synchronously, without waiting for a Deferred to resolve.
Parameters |
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
this.getFileSystem() → goog.fs.FileSystem
goog.fs.FileSystem
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.getFullPath() → string
string
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.getLastModified() → goog.async.Deferred
goog.async.Deferred
Retrieves the last modified date for this entry.
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.getMetadata() → goog.async.Deferred
goog.async.Deferred
Retrieves the metadata for this entry.
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.getName() → string
string
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.getParent() → goog.async.Deferred
goog.async.Deferred
Gets the parent directory.
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.hasChild( name ) → boolean
boolean
this.isDirectory() → boolean
boolean
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.isFile() → boolean
boolean
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.listDirectory() → goog.async.Deferred
goog.async.Deferred
Gets a list of all entries in this directory.
Specified by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.moveTo( parent, opt_newName ) → goog.async.Deferred
goog.async.Deferred
Move this entry to a new location.
Overrides | |||||||||
---|---|---|---|---|---|---|---|---|---|
Specified by | |||||||||
Parameters |
| ||||||||
Returns |
|
this.remove() → goog.async.Deferred
goog.async.Deferred
Remove this entry.
Overrides | |||
---|---|---|---|
Specified by | |||
Parameters | None. | ||
Returns |
|
this.removeRecursively() → goog.async.Deferred
goog.async.Deferred
Removes this directory and all its contents.
Specified by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.toUri( opt_mimeType ) → string
string
this.toUrl( opt_mimeType ) → string
string
this.wrapEntry( entry ) → goog.fs.Entry
goog.fs.Entry
Wrap an HTML5 entry object in an appropriate subclass instance.
Overrides | |||||
---|---|---|---|---|---|
Specified by | |||||
Parameters |
| ||||
Returns |
|
Instance Properties
this.children → Object<?, goog.testing.fs.Entry>
Object<?, goog.testing.fs.Entry>
The map of child names to entry objects.
this.deleted → boolean
boolean
Whether or not this entry has been deleted.
this.parent → goog.testing.fs.DirectoryEntry
goog.testing.fs.DirectoryEntry
The parent of this entry.