elemental.html.DirectoryEntrySync Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vaadin-client Show documentation
Show all versions of vaadin-client Show documentation
Vaadin is a web application framework for Rich Internet Applications (RIA).
Vaadin enables easy development and maintenance of fast and
secure rich web
applications with a stunning look and feel and a wide browser support.
It features a server-side architecture with the majority of the logic
running
on the server. Ajax technology is used at the browser-side to ensure a
rich
and interactive user experience.
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package elemental.html;
import elemental.events.*;
import elemental.util.*;
import elemental.dom.*;
import elemental.html.*;
import elemental.css.*;
import elemental.stylesheets.*;
import java.util.Date;
/**
* DRAFT This page is not complete.
The DirectoryEntry
interface of the FileSystem API represents a directory in a file system.
*/
public interface DirectoryEntrySync extends EntrySync {
/**
* Creates a new DirectoryReader to read entries from this Directory.
void getMetada ();
Returns
DirectoryReader
*/
DirectoryReaderSync createReader();
/**
* Creates or looks up a directory.
void vopyTo (
(in DOMString path, optional Flags options, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
- path
- Either an absolute path or a relative path from this DirectoryEntry to the file to be looked up or created. It is an error to attempt to create a file whose immediate parent does not yet exist.
- options
- If create and exclusive are both true, and the path already exists, getDirectory must fail.
- If create is true, the path doesn't exist, and no other error occurs, getDirectory must create it as a zero-length file and return a corresponding getDirectory.
- If create is not true and the path doesn't exist, getDirectory must fail.
- If create is not true and the path exists, but is a directory, getDirectory must fail.
- Otherwise, if no other error occurs, getFile must return a getDirectory corresponding to path.
successCallback
A callback that is called to return the DirectoryEntry selected or created.
errorCallback
A callback that is called when errors happen.
Returns
void
*/
DirectoryEntrySync getDirectory(String path, Object flags);
/**
* Creates or looks up a file.
void moveTo (
(in DOMString path, optional Flags options, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
- path
- Either an absolute path or a relative path from this DirectoryEntry to the file to be looked up or created. It is an error to attempt to create a file whose immediate parent does not yet exist.
- options
- If create and exclusive are both true, and the path already exists, getFile must fail.
- If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a zero-length file and return a corresponding FileEntry.
- If create is not true and the path doesn't exist, getFile must fail.
- If create is not true and the path exists, but is a directory, getFile must fail.
- Otherwise, if no other error occurs, getFile must return a FileEntry corresponding to path.
- successCallback
- A callback that is called to return the file selected or created.
- errorCallback
- A callback that is called when errors happen.
Returns
void
*/
FileEntrySync getFile(String path, Object flags);
/**
* Deletes a directory and all of its contents, if any. If you are deleting a directory that contains a file that cannot be removed, some of the contents of the directory might be deleted. You cannot delete the root directory of a file system.
DOMString toURL (
(in VoidCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
- successCallback
- A callback that is called to return the DirectoryEntry selected or created.
- errorCallback
- A callback that is called when errors happen.
Returns
void
*/
void removeRecursively();
}