Os.java revision 7e25eff38a191d9c19e45093f4fde5102fb09d78
1/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package libcore.io;
18
19import java.io.FileDescriptor;
20
21public interface Os {
22    public boolean access(String path, int mode) throws ErrnoException;
23    public String[] environ();
24    public void fdatasync(FileDescriptor fd) throws ErrnoException;
25    public StructStat fstat(FileDescriptor fd) throws ErrnoException;
26    public void fsync(FileDescriptor fd) throws ErrnoException;
27    public void ftruncate(FileDescriptor fd, long length) throws ErrnoException;
28    public String getenv(String name);
29    public boolean isatty(FileDescriptor fd);
30    public long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException;
31    public long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException;
32    public void msync(long address, long byteCount, int flags) throws ErrnoException;
33    public void munmap(long address, long byteCount) throws ErrnoException;
34    public StructStat lstat(String path) throws ErrnoException;
35    public StructStat stat(String path) throws ErrnoException;
36    public String strerror(int errno);
37    public long sysconf(int name);
38}
39