license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
This object contains attributes of a single file.
The File
object contains attributes of a single file. You can get an instance of a File object by calling the file method of a FileEntry
object.
Return a new File object, for which FileReader will return only the specified portion of the file. Negative values for start or end are measured from the end of the file. The indexes are always relative to the current slice (see the full example).
Parameters:
Quick Example
var slicedFile = file.slice(10, 30);
Full Example
var slice1 = file.slice(100, 400); var slice2 = slice1.slice(20, 35); var slice3 = file.slice(120, 135); // slice2 and slice3 are equivalent.
Supported Platforms: