Module support #11

Merged
TopchetoEU merged 20 commits from TopchetoEU/modules into master 2023-12-26 12:20:55 +00:00
2 changed files with 43 additions and 43 deletions
Showing only changes of commit 7a301eba8f - Show all commits

View File

@ -18,7 +18,7 @@ public interface File {
setPtr(0, 0);
byte[] res = new byte[(int)len];
read(res);
len = read(res);
return new String(res);
}

View File

@ -35,9 +35,9 @@ public class PhysicalFile implements File {
if (file == null || !perms.readable) throw new FilesystemException(filename, FSCode.NO_PERMISSIONS_R);
try {
if (pos == 1) pos += file.getFilePointer();
else if (pos == 2) pos += file.length();
file.seek(pos);
if (pos == 1) offset += file.getFilePointer();
else if (pos == 2) offset += file.length();
file.seek(offset);
}
catch (IOException e) { throw new FilesystemException(filename, FSCode.NO_PERMISSIONS_R); }
}