blob: 16392a1e2b427d0f5517797c1534dad17c1aa6aa [file] [log] [blame]
/**
* 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.
*/
package com.jwplayer.sqe.util.file.resource;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.nio.file.*;
import java.util.Iterator;
public class ResourcePath implements Path {
URI uri;
FileSystem fileSystem;
public ResourcePath(FileSystem fileSystem, URI uri) {
this.fileSystem = fileSystem;
this.uri = uri;
}
@Override
public FileSystem getFileSystem() {
return fileSystem;
}
@Override
public boolean isAbsolute() {
return true;
}
@Override
public Path getRoot() {
throw new UnsupportedOperationException();
}
@Override
public Path getFileName() {
throw new UnsupportedOperationException();
}
@Override
public Path getParent() {
throw new UnsupportedOperationException();
}
@Override
public int getNameCount() {
throw new UnsupportedOperationException();
}
@Override
public Path getName(int index) {
throw new UnsupportedOperationException();
}
@Override
public Path subpath(int beginIndex, int endIndex) {
throw new UnsupportedOperationException();
}
@Override
public boolean startsWith(Path other) {
throw new UnsupportedOperationException();
}
@Override
public boolean startsWith(String other) {
throw new UnsupportedOperationException();
}
@Override
public boolean endsWith(Path other) {
throw new UnsupportedOperationException();
}
@Override
public boolean endsWith(String other) {
throw new UnsupportedOperationException();
}
@Override
public Path normalize() {
return this;
}
@Override
public Path resolve(Path other) {
throw new UnsupportedOperationException();
}
@Override
public Path resolve(String other) {
throw new UnsupportedOperationException();
}
@Override
public Path resolveSibling(Path other) {
throw new UnsupportedOperationException();
}
@Override
public Path resolveSibling(String other) {
throw new UnsupportedOperationException();
}
@Override
public Path relativize(Path other) {
throw new UnsupportedOperationException();
}
@Override
public URI toUri() {
return uri;
}
@Override
public Path toAbsolutePath() {
return this;
}
@Override
public Path toRealPath(LinkOption... options) throws IOException {
throw new UnsupportedOperationException();
}
@Override
public File toFile() {
throw new UnsupportedOperationException();
}
@Override
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws IOException {
throw new UnsupportedOperationException();
}
@Override
public WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws IOException {
throw new UnsupportedOperationException();
}
@Override
public Iterator<Path> iterator() {
throw new UnsupportedOperationException();
}
@Override
public int compareTo(Path other) {
return 0;
}
}