This file contains hidden or 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
import C.errno.*; | |
import C.dirent.*; | |
trace( "----" ); | |
var dirp:DIR = opendir( "." ); | |
if( !dirp ) | |
{ | |
trace( "Could not open directory \".\"" ); | |
} |
This file contains hidden or 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
import C.errno.*; | |
import C.stdlib.*; | |
import C.dirent.*; | |
import C.fcntl.*; | |
import C.sys.stat.*; | |
trace( "----" ); | |
/* note: |
This file contains hidden or 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
import C.errno.*; | |
import C.stdlib.*; | |
import C.dirent.*; | |
import C.sys.stat.*; | |
trace( "----" ); | |
function getFilesBySize( dirname:String, smallerFirst:Boolean = true ):Array | |
{ | |
var entries:Array = []; |
This file contains hidden or 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
import C.dirent.*; | |
import C.sys.stat.*; | |
import C.unistd.*; | |
/** | |
* Returns a list of files. | |
*/ | |
public function getfiles( path:String = "." ):Array | |
{ | |
var files:Array = []; |
This file contains hidden or 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
//... | |
struct addrinfo hints, *res; | |
int sockfd; | |
memset(&hints, 0, sizeof hints); | |
hints.ai_family = AF_INET; | |
hints.ai_socktype = SOCK_STREAM; | |
hints.ai_flags = AI_PASSIVE; | |
int result = getaddrinfo(NULL, "3490", &hints, &res); |
This file contains hidden or 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
import C.errno.*; | |
import C.arpa.inet.*; | |
import C.netdb.*; | |
import C.sys.socket.*; | |
import C.stdlib.*; | |
import C.unistd.*; | |
var hostname:String = "www.google.com"; | |
trace( "hostname = " + hostname ); |
This file contains hidden or 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
import C.errno.*; | |
import C.arpa.inet.*; | |
import C.netdb.*; | |
import C.sys.socket.*; | |
import C.stdlib.*; | |
import C.unistd.*; | |
var hostname:String = gethostname(); | |
trace( "hostname = " + hostname ); |
This file contains hidden or 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
/* build: | |
import redbean.*; | |
import shell.FileSystem; | |
compile( "src/index.as" ); | |
if( FileSystem.exists( "index.abc" ) ) | |
{ |
This file contains hidden or 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
/* build: | |
import redbean.*; | |
import shell.FileSystem; | |
compile( "src/index.as" ); | |
if( FileSystem.exists( "index.abc" ) ) | |
{ |
This file contains hidden or 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
import C.stdio.*; | |
import flash.utils.ByteArray; | |
import shell.FileSystem; | |
import shell.Program; | |
/* NOTE: | |
trace() add a carriage return | |
better use Program.write() to | |
control exactly the char return at end of line | |
*/ |
OlderNewer