public class AssetTree
Class AssetTree. Provides assettree functionality for the Hytale server.
java.lang.Object > AssetTree
Field Summary
stamp
final
long
stamp
Field stamp.
pathString
final
String
pathString
Field pathString.
assets
final
List
assets
Field assets.
index
final
int
index
Field index.
fileIndex
final
int
fileIndex
Field fileIndex.
hasFile
final
boolean
hasFile
Field hasFile.
name
final
String
name
Field name.
entry
final
AssetEditorFileEntry
entry
Field entry.
pathPrefix
final
String
pathPrefix
Field pathPrefix.
asset
final
AssetEditorFileEntry
asset
Field asset.
start
final
long
start
Field start.
assetTypePaths
final
Set
assetTypePaths
Field assetTypePaths.
subPaths
final
Set
subPaths
Field subPaths.
assetTypePath
final
String
assetTypePath
Field assetTypePath.
path
final
Path
path
Field path.
dirPath
final
Path
dirPath
Field dirPath.
name2
final
String
name2
Field name2.
Method Detail
AssetTree
public
public
AssetTree
(final Path rootPath, final String packKey, final boolean isReadOnly, final boolean canBeDeleted)
Method AssetTree.
- Parameters:
final PathrootPathfinal StringpackKeyfinal booleanisReadOnlyfinal booleancanBeDeleted
AssetEditorAssetListSetup
public
new
AssetEditorAssetListSetup
(this.packKey, this.isReadOnly, this.canBeDeleted, AssetEditorFileTree.Server, this.serverAssets.toArray(AssetEditorFileEntry[]::new)
Method AssetEditorAssetListSetup.
- Parameters:
this.packKeythis.packKeythis.isReadOnlythis.isReadOnlythis.canBeDeletedthis.canBeDeletedAssetEditorFileTree.ServerAssetEditorFileTree.Serverthis.serverAssets.toArray(AssetEditorFileEntry[]::newthis.serverAssets.toArray(AssetEditorFileEntry[]::new
isDirectoryEmpty
public
boolean
isDirectoryEmpty
(@Nonnull final Path path)
Method isDirectoryEmpty.
- Parameters:
@Nonnull final Pathpath
ensureAsset
Method ensureAsset.
- Parameters:
@Nonnull final Pathpathfinal booleanisDirectory
AssetEditorFileEntry
public
new
AssetEditorFileEntry
(name, true)
Method AssetEditorFileEntry.
- Parameters:
namenametruetrue
getAssetFile
Method getAssetFile.
- Parameters:
@Nonnull final Pathpath
removeAsset
Method removeAsset.
- Parameters:
@Nonnull final Pathpath
applyAssetChanges
public
void
applyAssetChanges
(@Nonnull final Map createdDirectories, @Nonnull final Map modifiedAssets)
Method applyAssetChanges.
- Parameters:
@Nonnull final MapcreatedDirectories@Nonnull final MapmodifiedAssets
if
public
else
if
(file.state == AssetState.DELETED)
Method if.
- Parameters:
file.state ==AssetState.DELETED
getAssetListForPath
private
List
getAssetListForPath
(@Nonnull final Path path)
Method getAssetListForPath.
- Parameters:
@Nonnull final Pathpath
IllegalArgumentException
public
new
IllegalArgumentException
("Invalid path " + String.valueOf(path)
Method IllegalArgumentException.
- Parameters:
"Invalid path " +String.valueOf(path
load
private
void
load
(@Nonnull final Collection assetTypes)
Method load.
- Parameters:
@Nonnull final CollectionassetTypes
loadServerAssets
static
void
loadServerAssets
(@Nonnull final Path root, @Nonnull final Collection assetTypes, @Nonnull final List files)
Method loadServerAssets.
- Parameters:
@Nonnull final Pathroot@Nonnull final CollectionassetTypes@Nonnull final Listfiles
walkFileTree
static
void
walkFileTree
(@Nonnull final Path root, @Nonnull final Path dirPath, @Nonnull final List files)
Method walkFileTree.
- Parameters:
@Nonnull final Pathroot@Nonnull final PathdirPath@Nonnull final Listfiles
preVisitDirectory
public
FileVisitResult
preVisitDirectory
(final Path path, final BasicFileAttributes attrs)
Method preVisitDirectory.
- Parameters:
final Pathpathfinal BasicFileAttributesattrs
visitFile
public
FileVisitResult
visitFile
(@Nonnull final Path path, @Nonnull final BasicFileAttributes attrs)
Method visitFile.
- Parameters:
@Nonnull final Pathpath@Nonnull final BasicFileAttributesattrs