All Downloads are FREE. Search and download functionalities are using the official Maven repository.

elemental.html.Entry Maven / Gradle / Ivy

Go to download

This module exists solely to package all other gwt modules into a single uber jar. This makes deploying to non-mavenized targets much easier. Of course, you would be wise to inherit your dependencies individually; the uber jar is intended for projects like collide, which have complex configuration, and adding many jars would be a pain.

The newest version!
/*
 * 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 Entry interface of the FileSystem API represents entries in a file system. The entries can be a file or a DirectoryEntry.

*/ public interface Entry { /** * The file system on which the entry resides. */ DOMFileSystem getFilesystem(); String getFullPath(); /** * The entry is a directory. */ boolean isDirectory(); /** * The entry is a file. */ boolean isFile(); /** * The name of the entry, excluding the path leading to it. */ String getName(); /** *

Copy an entry to a different location on the file system. You cannot copy an entry inside itself if it is a directory nor can you copy it into its parent if a name different from its current one isn't provided. Directory copies are always recursive—that is, they copy all contents of the directory.

void vopyTo (
  (in DirectoryEntry parent, optional DOMString newName, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void copyTo(DirectoryEntry parent); /** *

Copy an entry to a different location on the file system. You cannot copy an entry inside itself if it is a directory nor can you copy it into its parent if a name different from its current one isn't provided. Directory copies are always recursive—that is, they copy all contents of the directory.

void vopyTo (
  (in DirectoryEntry parent, optional DOMString newName, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void copyTo(DirectoryEntry parent, String name); /** *

Copy an entry to a different location on the file system. You cannot copy an entry inside itself if it is a directory nor can you copy it into its parent if a name different from its current one isn't provided. Directory copies are always recursive—that is, they copy all contents of the directory.

void vopyTo (
  (in DirectoryEntry parent, optional DOMString newName, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void copyTo(DirectoryEntry parent, String name, EntryCallback successCallback); /** *

Copy an entry to a different location on the file system. You cannot copy an entry inside itself if it is a directory nor can you copy it into its parent if a name different from its current one isn't provided. Directory copies are always recursive—that is, they copy all contents of the directory.

void vopyTo (
  (in DirectoryEntry parent, optional DOMString newName, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void copyTo(DirectoryEntry parent, String name, EntryCallback successCallback, ErrorCallback errorCallback); /** *

Look up metadata about this entry.

void getMetada (
  in MetadataCallback ErrorCallback
);
Parameter
successCallback
A callback that is called with the time of the last modification.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void getMetadata(MetadataCallback successCallback); /** *

Look up metadata about this entry.

void getMetada (
  in MetadataCallback ErrorCallback
);
Parameter
successCallback
A callback that is called with the time of the last modification.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void getMetadata(MetadataCallback successCallback, ErrorCallback errorCallback); /** *

Look up the parent DirectoryEntry containing this entry. If this entry is the root of its filesystem, its parent is itself.

void getParent (
  (in EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCellback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void getParent(); /** *

Look up the parent DirectoryEntry containing this entry. If this entry is the root of its filesystem, its parent is itself.

void getParent (
  (in EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCellback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void getParent(EntryCallback successCallback); /** *

Look up the parent DirectoryEntry containing this entry. If this entry is the root of its filesystem, its parent is itself.

void getParent (
  (in EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCellback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void getParent(EntryCallback successCallback, ErrorCallback errorCallback); /** *

Move an entry to a different location on the file system. You cannot do the following:

  • move a directory inside itself or to any child at any depth;
  • move an entry into its parent if a name different from its current one isn't provided;
  • move a file to a path occupied by a directory;
  • move a directory to a path occupied by a file;
  • move any element to a path occupied by a directory which is not empty.

Moving a file over an existing file replaces that existing file. A move of a directory on top of an existing empty directory replaces that directory.

void moveTo (
  (in DirectoryEntry parent, optional DOMString newName, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void moveTo(DirectoryEntry parent); /** *

Move an entry to a different location on the file system. You cannot do the following:

  • move a directory inside itself or to any child at any depth;
  • move an entry into its parent if a name different from its current one isn't provided;
  • move a file to a path occupied by a directory;
  • move a directory to a path occupied by a file;
  • move any element to a path occupied by a directory which is not empty.

Moving a file over an existing file replaces that existing file. A move of a directory on top of an existing empty directory replaces that directory.

void moveTo (
  (in DirectoryEntry parent, optional DOMString newName, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void moveTo(DirectoryEntry parent, String name); /** *

Move an entry to a different location on the file system. You cannot do the following:

  • move a directory inside itself or to any child at any depth;
  • move an entry into its parent if a name different from its current one isn't provided;
  • move a file to a path occupied by a directory;
  • move a directory to a path occupied by a file;
  • move any element to a path occupied by a directory which is not empty.

Moving a file over an existing file replaces that existing file. A move of a directory on top of an existing empty directory replaces that directory.

void moveTo (
  (in DirectoryEntry parent, optional DOMString newName, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void moveTo(DirectoryEntry parent, String name, EntryCallback successCallback); /** *

Move an entry to a different location on the file system. You cannot do the following:

  • move a directory inside itself or to any child at any depth;
  • move an entry into its parent if a name different from its current one isn't provided;
  • move a file to a path occupied by a directory;
  • move a directory to a path occupied by a file;
  • move any element to a path occupied by a directory which is not empty.

Moving a file over an existing file replaces that existing file. A move of a directory on top of an existing empty directory replaces that directory.

void moveTo (
  (in DirectoryEntry parent, optional DOMString newName, optional EntryCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
parent
The directory to which to move the entry.
newName
The new name of the entry. Defaults to the entry's current name if unspecified.
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void moveTo(DirectoryEntry parent, String name, EntryCallback successCallback, ErrorCallback errorCallback); /** *

Deletes a file or directory. You cannot delete an empty directory or the root directory of a filesystem.

void remove (
  (in VoidCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void remove(VoidCallback successCallback); /** *

Deletes a file or directory. You cannot delete an empty directory or the root directory of a filesystem.

void remove (
  (in VoidCallback successCallback, optional ErrorCallback errorCallback);
);
Parameter
successCallback
A callback that is called with the entry for the new object.
errorCallback
A callback that is called when errors happen.
Returns
void
*/ void remove(VoidCallback successCallback, ErrorCallback errorCallback); /** *

Returns a URL that can be used to identify this entry. It has no specific expiration. Bcause it describes a location on disk, it is valid for as long as that location exists. Users can supply mimeType to simulate the optional mime-type header associated with HTTP downloads.

DOMString toURL (
  (in optional DOMString mimeType);
);
Parameter
mimeType
For a FileEntry, the mime type to be used to interpret the file, when loaded through this URL.
Returns
DOMString
*/ String toURL(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy