forked from martint/s3fs
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added initial simple implementation and not completed.
- Loading branch information
Showing
19 changed files
with
865 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...om/upplication/s3fs/S3FileAttributes.java → ...s3fs/attribute/S3BasicFileAttributes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/main/java/com/upplication/s3fs/attribute/S3GroupPrincipal.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.upplication.s3fs.attribute; | ||
|
||
import java.nio.file.attribute.GroupPrincipal; | ||
|
||
public class S3GroupPrincipal implements GroupPrincipal { | ||
@Override | ||
public String getName() { | ||
return null; | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/com/upplication/s3fs/attribute/S3PosixFileAttributes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.upplication.s3fs.attribute; | ||
|
||
import java.nio.file.attribute.*; | ||
import java.util.Set; | ||
|
||
import static java.lang.String.format; | ||
|
||
public class S3PosixFileAttributes extends S3BasicFileAttributes implements PosixFileAttributes { | ||
|
||
private UserPrincipal userPrincipal; | ||
private GroupPrincipal groupPrincipal; | ||
private Set<PosixFilePermission> posixFilePermissions; | ||
|
||
public S3PosixFileAttributes(String key, FileTime lastModifiedTime, long size, boolean isDirectory, boolean isRegularFile, UserPrincipal userPrincipal, GroupPrincipal groupPrincipal, Set<PosixFilePermission> posixFilePermissionSet) { | ||
|
||
super(key, lastModifiedTime, size, isDirectory, isRegularFile); | ||
|
||
this.userPrincipal = userPrincipal; | ||
this.groupPrincipal = groupPrincipal; | ||
this.posixFilePermissions = posixFilePermissionSet; | ||
} | ||
|
||
@Override | ||
public UserPrincipal owner() { | ||
return this.userPrincipal; | ||
} | ||
|
||
@Override | ||
public GroupPrincipal group() { | ||
return this.groupPrincipal; | ||
} | ||
|
||
@Override | ||
public Set<PosixFilePermission> permissions() { | ||
return this.posixFilePermissions; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/upplication/s3fs/attribute/S3UserPrincipal.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.upplication.s3fs.attribute; | ||
|
||
import java.nio.file.attribute.UserPrincipal; | ||
|
||
public class S3UserPrincipal implements UserPrincipal { | ||
|
||
private String name; | ||
|
||
public S3UserPrincipal(String name) { | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.