@Override public String[] getNames() throws RemoteException { assertPreparedAndNotSealed("getNames"); try { return resolveStageDir().list(); } catch (IOException e) { throw new IllegalStateException(e); } }
private ParcelFileDescriptor openReadInternal(String name) throws IOException { assertPreparedAndNotSealed("openRead"); try { if (!FileUtils.isValidExtFilename(name)) { throw new IllegalArgumentException("Invalid name: " + name); } final File target = new File(resolveStageDir(), name); final FileDescriptor targetFd = Os.open(target.getAbsolutePath(), O_RDONLY, 0); return ParcelFileDescriptor.dup(targetFd); } catch (ErrnoException e) { throw new IOException(e); } }
@Override public String[] getNames() throws RemoteException { assertPreparedAndNotSealed("getNames"); try { return resolveStageDir().list(); } catch (IOException e) { throw new IllegalStateException(e); } }
@Override public String[] getNames() throws RemoteException { assertPreparedAndNotSealed("getNames"); try { return resolveStageDir().list(); } catch (IOException e) { throw new IllegalStateException(e); } }
private ParcelFileDescriptor openReadInternal(String name) throws IOException { assertPreparedAndNotSealed("openRead"); try { if (!FileUtils.isValidExtFilename(name)) { throw new IllegalArgumentException("Invalid name: " + name); } final File target = new File(resolveStageDir(), name); final FileDescriptor targetFd = Os.open(target.getAbsolutePath(), O_RDONLY, 0); return ParcelFileDescriptor.dup(targetFd); } catch (ErrnoException e) { throw new IOException(e); } }
private ParcelFileDescriptor openReadInternal(String name) throws IOException { assertPreparedAndNotSealed("openRead"); try { if (!FileUtils.isValidExtFilename(name)) { throw new IllegalArgumentException("Invalid name: " + name); } final File target = new File(resolveStageDir(), name); final FileDescriptor targetFd = Os.open(target.getAbsolutePath(), O_RDONLY, 0); return ParcelFileDescriptor.dup(targetFd); } catch (ErrnoException e) { throw new IOException(e); } }
assertPreparedAndNotSealed("openWrite");
assertPreparedAndNotSealed("openWrite");