Roxen.git / server / etc / modules / Variable.pmod / module.pmod

version» Context lines:

Roxen.git/server/etc/modules/Variable.pmod/module.pmod:582:    //! Read the file as a string.    {    return Stdio.read_bytes( query() );    }       array stat()    //! Stat the file    {    return file_stat( query() );    } +  + #ifdef __NT__ +  array verify_set( string value ) +  { +  return ::verify_set( replace( value, "\\", "/" ) );    } -  + #endif    -  + } +    class Location   //! A location in the virtual filesystem   {    inherit String;    constant type = "Location";    constant width = 50;   }      class URL   //! A URL.
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:614:      class Directory   //! A Directory.   {    inherit String;    constant type = "Directory";    constant width = 50;       array verify_set( string value )    { + #ifdef __NT__ +  value = replace( value, "\\", "/" ); + #endif +  if( strlen(value) && value[-1] != '/' ) +  value += "/";    if( !strlen( value ) )    return ::verify_set( value );    if( !(r_file_stat( value ) && (r_file_stat( value )[ ST_SIZE ] == -2 )))    return ({value+" is not a directory", value }); -  if( strlen(value) && value[-1] != '/' ) -  value += "/"; +     return ::verify_set( value );    }       array stat()    //! Stat the directory    {    return file_stat( query() );    }       array get( )
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:959:    {    string warn = "";    foreach( value, string vi )    {    if(!strlen(vi)) // empty    continue;    if( !(r_file_stat( vi ) && (r_file_stat( vi )[ ST_SIZE ] == -2 )))    warn += vi+" is not a directory\n";    if( strlen(vi) && vi[-1] != '/' )    value = replace( value, vi, vi+"/" ); + #ifdef __NT__ +  value = replace( value, vl, replace( vl, "\\", "/" ) ); + #endif    }    if( strlen( warn ) )    return ({ warn, value });       return ::verify_set( value );    }   }      class StringList   //! A list of strings
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1063:    return ({ warn, res });    }   }         class FileList   //! A list of filenames.   {    inherit List;    constant type="FileList"; +  + #ifdef __NT__ +  array verify_set( array(string) value ) +  { +  return ::verify_set( map( value, replace, "\\", "/" ) );    } -  + #endif + }         // =====================================================================   // Flag   // =====================================================================      class Flag   //! A on/off toggle.   {    inherit Variable;