mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
refactor:rename package name.
Signed-off-by: zhangtianjiong <hanhanztj@sina.com>
This commit is contained in:
parent
1777ca4ffb
commit
44116b2d66
@ -17,7 +17,7 @@ cd docker
|
||||
## Run the java test program
|
||||
|
||||
```
|
||||
java -cp target/libchubaofs-1.0-SNAPSHOT-jar-with-dependencies.jar io.chubao.fs.TestCfsClient ls <dirpath>
|
||||
java -cp target/libchubaofs-1.0-SNAPSHOT-jar-with-dependencies.jar io.chubao.fs.TestCfsClient read <filepath>
|
||||
java -cp target/libchubaofs-1.0-SNAPSHOT-jar-with-dependencies.jar io.chubao.fs.TestCfsClient write <filepath>
|
||||
java -cp target/libcubefs-1.0-SNAPSHOT-jar-with-dependencies.jar io.chubao.fs.TestCfsClient ls <dirpath>
|
||||
java -cp target/libcubefs-1.0-SNAPSHOT-jar-with-dependencies.jar io.chubao.fs.TestCfsClient read <filepath>
|
||||
java -cp target/libcubefs-1.0-SNAPSHOT-jar-with-dependencies.jar io.chubao.fs.TestCfsClient write <filepath>
|
||||
```
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>io.chubao</groupId>
|
||||
<artifactId>libchubaofs</artifactId>
|
||||
<groupId>io.cubefs</groupId>
|
||||
<artifactId>libcubefs</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>libchubaofs</name>
|
||||
<name>libcubefs</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package io.chubao.fs;
|
||||
package io.cubefs.fs;
|
||||
|
||||
import com.sun.jna.Library;
|
||||
import com.sun.jna.Structure;
|
||||
@ -1,11 +1,8 @@
|
||||
package io.chubao.fs;
|
||||
package io.cubefs.fs;
|
||||
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Pointer;
|
||||
|
||||
import io.chubao.fs.CfsLibrary.Dirent;
|
||||
import io.chubao.fs.CfsLibrary.DirentArray;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -110,9 +107,9 @@ public class CfsMount {
|
||||
* Note that the memory allocated for Dirent[] must be countinuous. For example,
|
||||
* (new Dirent()).toArray(count).
|
||||
*/
|
||||
public int readdir(int fd, Dirent[] dents, int count) {
|
||||
public int readdir(int fd, CfsLibrary.Dirent[] dents, int count) {
|
||||
Pointer arr = dents[0].getPointer();
|
||||
DirentArray.ByValue slice = new DirentArray.ByValue();
|
||||
CfsLibrary.DirentArray.ByValue slice = new CfsLibrary.DirentArray.ByValue();
|
||||
slice.data = arr;
|
||||
slice.len = (long) count;
|
||||
slice.cap = (long) count;
|
||||
@ -1,6 +1,4 @@
|
||||
package io.chubao.fs;
|
||||
|
||||
import io.chubao.fs.CfsLibrary.Dirent;
|
||||
package io.cubefs.fs;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
@ -102,8 +100,8 @@ public class TestCfsClient {
|
||||
}
|
||||
|
||||
int total_entry = 0;
|
||||
Dirent dent = new Dirent();
|
||||
Dirent[] dents = (Dirent[]) dent.toArray(2);
|
||||
CfsLibrary.Dirent dent = new CfsLibrary.Dirent();
|
||||
CfsLibrary.Dirent[] dents = (CfsLibrary.Dirent[]) dent.toArray(2);
|
||||
for (;;) {
|
||||
int n = mnt.readdir(fd, dents, 2);
|
||||
if (n <= 0) {
|
||||
Loading…
Reference in New Issue
Block a user