Added getMaximumFilenameLength. This is used by the ImportWizard

to keep names a sensible length.
This commit is contained in:
Robert Greene 2003-01-21 05:14:46 +00:00
parent c1fd274559
commit 70f5149d18
5 changed files with 33 additions and 0 deletions

View File

@ -86,6 +86,13 @@ public class DosFileEntry implements FileEntry {
disk.writeSector(track, sector, sectorData);
}
/**
* Return the maximum filename length.
*/
public int getMaximumFilenameLength() {
return 30;
}
/**
* Return the name of this file.
* @see com.webcodepro.applecommander.storage.FileEntry#getFilename()

View File

@ -121,4 +121,9 @@ public interface FileEntry {
* disk.
*/
public FormattedDisk getFormattedDisk();
/**
* Return the maximum filename length.
*/
public int getMaximumFilenameLength();
}

View File

@ -64,6 +64,13 @@ public class PascalFileEntry implements FileEntry {
public String getFilename() {
return AppleUtil.getPascalString(fileEntry, 6);
}
/**
* Return the maximum filename length.
*/
public int getMaximumFilenameLength() {
return 15;
}
/**
* Return the filetype of this file.

View File

@ -139,6 +139,13 @@ public class ProdosFileEntry extends ProdosCommonEntry implements FileEntry {
return fileName;
}
/**
* Return the maximum filename length.
*/
public int getMaximumFilenameLength() {
return 15;
}
/**
* Set the name of this file.
*/

View File

@ -82,6 +82,13 @@ public class RdosFileEntry implements FileEntry {
public String getFilename() {
return isDeleted() ? "<NOT IN USE> " : AppleUtil.getString(fileEntry, 0, 24);
}
/**
* Return the maximum filename length.
*/
public int getMaximumFilenameLength() {
return 24;
}
/**
* Return the filetype of this file.