Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 |
//============================================================================== // Created on: 10/12/2003 // Handles file & directory manipulation for streaming music files. // Could support arbitrary filetypes with very little modification // // Written by Ron Prestenback // © 2003, Epic Games, Inc. All Rights Reserved //============================================================================== class StreamInterface extends StreamBase Native; // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) var private globalconfig string CurrentDirectory; // Directory Interface native final private function string GetBaseDirectory(); native final function bool GetDriveLetters( out array<string> Letters ); native final function bool GetDirectoryContents( out array<string> Contents, optional string DirectoryName, optional EFileType FileType ); native final function string CreateDirectory( string DirectoryName ); native final function bool RemoveDirectory( string DirectoryName ); native final function bool ValidDirectory( optional string DirectoryPath ); // ID3 Tags // File manipulation native final function Stream CreateStream( string FileName, optional bool bStrict ); // specify bStrict to indicate it isn't allowed to include relative paths when searching native final function bool ValidFile( string FileName ); native final function bool LoadPlaylist( string FileName, out array<string> Lines, optional bool bStrict ); function string GetCurrentDirectory() { if ( CurrentDirectory == "" || !ValidDirectory(CurrentDirectory) ) ChangeDirectory(GetBaseDirectory()); return CurrentDirectory; } function ChangeDirectory( string DirectoryName ) { local bool bSave; bSave = DirectoryName != CurrentDirectory; CurrentDirectory = DirectoryName; if ( bSave ) SaveConfig(); } function bool HandleDebugExec( string Command, string Param ) { local string str; local array<string> test; local int i; if ( Super.HandleDebugExec(Command, Param) ) return true; switch ( Locs(Command) ) { case "getbase": log(GetBaseDirectory());return true; case "getcurrent": log(GetCurrentDirectory());return true; case "validfilename": log(ValidFile(Param));return true; case "dir": GetDirectoryContents(test,param); log("directory list for"@param); for ( i = 0; i < test.Length;i++) log(" >"@test[i]); return true; case "chdir": str = GetCurrentDirectory(); ChangeDirectory(param); log("old:"$str@"new:"$GetCurrentDirectory()); return true; } return false; } defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |